I am on linux mint using XAMPP 8.2.0 (linux version), that has MariaDB 10.4.27. Ran into a problem. I type the following MySQL code:

CREATE PROCEDURE employee_info(IN p_em_id INT)
SELECT * FROM mentorships WHERE mentor_id = p_em_id;
SELECT * FROM mentorships WHERE mentee_id = p_em_id;
SELECT * FROM employees WHERE id = p_em_id;
END $$

I get the following error message.

ERROR 1558 (HY000): Column count of mysql.proc is wrong. Expected 21, found 20. Created with MariaDB 100108, now running 100425. Please use mysql_upgrade to fix this error

It tells me to use my_sql upgrade to fix this problem.

But this does not make sense to me. my_sql upgrade is deprecated, so why are they still telling us to use it?

I uninstalled XAMPP in its entirety. Then reinstalled it, hoping it will work. But I am still getting this very SAME error message. Whats going on?

And oh yes, I posted this problem on the XAMPP forum called apachefriends. Sleepy place really. Just one active user. And even he has no clue.

I have looked around in stackexchange for this same error message. One post claims that running mysql_upgrade should do the trick. I tried it but got the following error message.

The mysql_upgrade client is now deprecated. The actions executed by the upgrade client are now done by the server. To upgrade, please start the new MySQL binary with the older data directory. Repairing user tables is done automatically. Restart is not required after upgrade. The upgrade process automatically starts on running a new MySQL binary with an older data directory. To avoid accidental upgrades, please use the --upgrade=NONE option with the MySQL binary. The option --upgrade=FORCE is also provided to run the server upgrade sequence on demand. It may be possible that the server upgrade fails due to a number of reasons. In that case, the upgrade sequence will run again during the next MySQL server start. If the server upgrade fails repeatedly, the server can be started with the --upgrade=MINIMAL option to start the server without executing the upgrade sequence, thus allowing users to manually rectify the problem.

Whats to be done about this?

Any help will be deeply appreciated. thanks.

  • What versions are you using Commented Feb 1, 2023 at 6:02
  • What version of MariaDB are you using? What version did you upgrade from?
    – Rick James
    Commented Feb 1, 2023 at 6:05
  • no upgrade, nothing of that sort, I uninstalled the slightly older version of XAMPP, and then reinstalled the latest version from apachefriends.org/download.html It is XAMPP 8.2.0 for linux. Contains MariaDB 10.4.27
    – SM Umair
    Commented Feb 1, 2023 at 6:43
  • You have not upgraded your (system) databases to your MariaDB version. You must do this.
    – Akina
    Commented Feb 1, 2023 at 11:23
  • @Akina Thanks for the reply. I made a fresh install of the latest XAMPP version, after that I created my trial database. Still I am getting this message. I guess my database is already at the latest version. Or no?
    – SM Umair
    Commented Feb 1, 2023 at 11:34

4 Answers 4


I got the solution for that same problem as follows:

Go to your XAMPP installed path, for my Debian system it is at /opt/lampp.

Then there find the bin folder and execute mysql_upgrade -u root -p.

For my Debian system it is sudo /opt/lampp/bin/mysql_upgrade -u root -p.



Run mariadb-upgrade.

The comment about mysql_upgrade being deprecated relate to MySQL, not MariaDB.

XAMPP calling MariaDB as MySQL in their product seems to be causing more harm than good.


After reading so many sites finally found the soultion on https://iqcode.com/code/html/column-count-of-mysqlproc-is-wrong-expected-21-found-20-created-with-mariadb-100108-now-running-100419-please-use-mysql-upgrade-to-fix-this-error-xampp

These are the steps you need to follow (linux/xampp)

  • go to terminal and type /opt/lampp/bin/mysql -u root -p

  • after that enter the mysql user password if it worked well then type exit (if it doesn't have password hit enter without typing anything)

  • after that type cd /opt/lampp/bin

  • and now type sudo ./mysql_upgrade -u root -p ,

  • enter your password and tadam , here is your mysql upgraded


in Mac, go to /Application/XAMPP/xamppfiles/var/mysql

in PC, go to c:\XAMPP\mysql\data

delete the folder that has the same name of your database in question.

This database then, of course, will be gone.

Recreate it, and restore from the sql backup.

Problem is now gone.

  • But why would someone do this? Commented Aug 14, 2023 at 10:24
  • This is a solution for those who has the sql backup of the database in questions: Why? Because, 1. Most of the solutions provided so far doesn't work. 2. For those case it do work, my method takes less than half the time.
    – Fei Li
    Commented Aug 24, 2023 at 22:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.