ERROR 1558 (HY000): Column count of mysql.proc is wrong

Problems with the Linux version of XAMPP, questions, comments, and anything related.

ERROR 1558 (HY000): Column count of mysql.proc is wrong

Postby SMU » 28. January 2023 14:06

Hey All,

I am on linux mint using xampp version 8.1.10-0, ran into a problem. I type the following MySQL code:

Code: Select all
DELIMITER $$
CREATE PROCEDURE employee_info(IN p_em_id INT)
BEGIN
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 $$
DELIMITER ;


I get the following error message.

Code: Select all
MariaDB [companyHR]> DELIMITER $$
MariaDB [companyHR]> CREATE PROCEDURE employee_info(IN p_em_id INT)
    -> BEGIN
    -> 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 $$
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
MariaDB [companyHR]>


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

But when I try to upgrade on the command line with the following:

Code: Select all
root@Dell-Inspiron-5515:/opt/lampp/bin# /mysql_upgrade -u root -p


It throws 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.

Very confused with all of this. First it tells to upgrade using mysql_upgrade. When I try that, it says that mysql_upgrade is deprecated.

and by the way, how am I supposed to upgrade MySQL? I am running xampp.

Will I have to uninstall xampp, download the latest file and then install it? Will it solve the problem? Is there a way to upgrade without uninstall?

Any help will be deeply appreciated. thanks.
SMU
 
Posts: 22
Joined: 21. November 2022 08:37
XAMPP version: 8.1.10-0
Operating System: Linux Mint 21

Re: ERROR 1558 (HY000): Column count of mysql.proc is wrong

Postby Nobbie » 29. January 2023 14:40

I wonder, how this can happen?! Did you exchange MariaDB "manually" with a newer release, but kept the "old" data??
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: ERROR 1558 (HY000): Column count of mysql.proc is wrong

Postby SMU » 29. January 2023 14:54

Nobbie wrote:I wonder, how this can happen?! Did you exchange MariaDB "manually" with a newer release, but kept the "old" data??


Hey there, its Nobbie to the rescue again, how are you? :mrgreen:

I did try to upgrade to latest version (as per error message recommendation) using mysql_upgrade. But that I understand is deprecated. Since 2019. So why are they STILL telling (in 2023!) to go this path? go figure.

Needless to say, the 'upgrade' failed. The ensuing error message is given above.

So, whats to be done?
SMU
 
Posts: 22
Joined: 21. November 2022 08:37
XAMPP version: 8.1.10-0
Operating System: Linux Mint 21

Re: ERROR 1558 (HY000): Column count of mysql.proc is wrong

Postby Nobbie » 29. January 2023 16:53

You did not "upgrade" anything before? I wonder, why this error happens NOW? It should be there from the very first beginning. And what does this mean: "Created with MariaDB 100108, now running 100425. "?? Who did that??
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: ERROR 1558 (HY000): Column count of mysql.proc is wrong

Postby SMU » 29. January 2023 19:03

Nobbie wrote:You did not "upgrade" anything before?

In a word, no. I have tried hard to love Linux Mint, but alas, its not user-friendly. In particular, installs/uninstalls/upgrades are a major hassle for yours truly. So when I do manage to install something on LM (more by luck than anything else) I let it be lest it break, heh heh.

Nobbie wrote:I wonder, why this error happens NOW? It should be there from the very first beginning. And what does this mean: "Created with MariaDB 100108, now running 100425. "?? Who did that??

Ah yes, its a fine mess, agreed. But I think that the key to this dilemma is in the error message provided

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.

Looks to me like I will have to install the whole darn thing all over again, right?

would love to do that (if it works, that is). However, Linux is anything but straightforward. If you know the nuances, pls guide me on the uninstall process. In windows, its just one-click and you are done. The same cant be said for Linux though.

and how do I backup the data for both mysql and php?
SMU
 
Posts: 22
Joined: 21. November 2022 08:37
XAMPP version: 8.1.10-0
Operating System: Linux Mint 21

Re: ERROR 1558 (HY000): Column count of mysql.proc is wrong

Postby Nobbie » 29. January 2023 19:17

SMU wrote:In a word, no. I have tried hard to love Linux Mint, but alas, its not user-friendly. In particular, installs/uninstalls/upgrades are a major hassle for yours truly. So when I do manage to install something on LM (more by luck than anything else) I let it be lest it break, heh heh.


BUT: Xampp is NOT(!) part of Linux Mint and is not related to ANYTHING from Linux Mint. Xampp is a standalone installation COMPLETELY INDEPENDENT from your distribution.

SMU wrote:Ah yes, its a fine mess, agreed. But I think that the key to this dilemma is in the error message provided


No, you think WRONG. The message is a FOLLOW UP of the change of MariaDB release (see the error message from previous posting). The message is NOT the cause of your troubles. The cause of your troubles is a change of your MariaDB Release. But why?! And how?! Xampp does not do any updates.

SMU wrote:Looks to me like I will have to install the whole darn thing all over again, right?


Probably. But before doing anything wrong (again) - we have to find out, WHY did your MariaDB Release got a change?? Its crucial to find out, what has happened and why it has happened. Xampp does not do any changes. It must be something else. But Linux Mint does not "know" about Xampp. I have no idea, what happened to your Xampp installation. I wont find out without your help. If you dont know, what has happened, nobody does.

SMU wrote:In windows, its just one-click and you are done. The same cant be said for Linux though.


No, you are wrong. First of all, its NOT a question of the Operating System (Windows / Linux), whether a software has an easy / difficult installation procedures. Its a question of the software itself. And second, its quite easy to uninstall Xampp on Linux as well. Simply enter this command in a terminal:

sudo rm -r /opt/lampp

and you are done. But: dont do it! We need your installation for backups, do not uninstall it before having a proper safe of all your data.
Last edited by Nobbie on 29. January 2023 19:24, edited 1 time in total.
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: ERROR 1558 (HY000): Column count of mysql.proc is wrong

Postby SMU » 29. January 2023 19:23

In case it helps, I will point out that I do remember seeing mysql in the update manager. I just click on the update manager whenever it shows an update.

But I dont think that this has anything to do with XAMPP.
SMU
 
Posts: 22
Joined: 21. November 2022 08:37
XAMPP version: 8.1.10-0
Operating System: Linux Mint 21

Re: ERROR 1558 (HY000): Column count of mysql.proc is wrong

Postby SMU » 29. January 2023 19:26

Nobbie wrote: But: dont do it! We need your installation for backups, do not uninstall it before having a proper safe of all your data.

how do I backup? If that is resolved, then uninstall should be no issue, right?
SMU
 
Posts: 22
Joined: 21. November 2022 08:37
XAMPP version: 8.1.10-0
Operating System: Linux Mint 21

Re: ERROR 1558 (HY000): Column count of mysql.proc is wrong

Postby Nobbie » 29. January 2023 19:45

You probably are running TWO installations of MySQL / MariaDB. This does not work. One of these will not start (the second one if you try to start both). When you decide you install and run Xampp, you must not install MySQL from the Linux Mint repository.

Dont you get an error message when starting MySQL from Xampp??
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: ERROR 1558 (HY000): Column count of mysql.proc is wrong

Postby SMU » 29. January 2023 20:18

Nobbie wrote:Dont you get an error message when starting MySQL from Xampp??

nope, starts up just fine.
SMU
 
Posts: 22
Joined: 21. November 2022 08:37
XAMPP version: 8.1.10-0
Operating System: Linux Mint 21

Re: ERROR 1558 (HY000): Column count of mysql.proc is wrong

Postby SMU » 29. January 2023 20:23

When I open up Software Manager, and type 'mysql', then 'Mysql-server' server appears with a green tick mark, meaning its already installed. I think its preinstalled like python is in linux.

and when I search for 'mysql' in synaptic, I can see several packages for mysql server.

could this be a cause of the problem?
SMU
 
Posts: 22
Joined: 21. November 2022 08:37
XAMPP version: 8.1.10-0
Operating System: Linux Mint 21

Re: ERROR 1558 (HY000): Column count of mysql.proc is wrong

Postby Nobbie » 29. January 2023 20:34

SMU wrote:I think its preinstalled like python is in linux.


That depends on our distribution. You say, you are running Linux MInt, thats what i do as well. That does NOT install MySQL per default. Maybe you installed a software package which requires MySQL, in that case it would have been installed then. But you can simply check it, open a terminal and enter "mysql". This should start the MySQL Commandline Interpreter - if it is installed. Either you get a prompt from the interpreter, or you get an error message that "mysql" cannot be found.
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: ERROR 1558 (HY000): Column count of mysql.proc is wrong

Postby SMU » 30. January 2023 05:47

Nobbie wrote: But you can simply check it, open a terminal and enter "mysql". This should start the MySQL Commandline Interpreter - if it is installed. Either you get a prompt from the interpreter, or you get an error message that "mysql" cannot be found.


opened terminal, typed 'mysql', got this error:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)


whats next?
SMU
 
Posts: 22
Joined: 21. November 2022 08:37
XAMPP version: 8.1.10-0
Operating System: Linux Mint 21

Re: ERROR 1558 (HY000): Column count of mysql.proc is wrong

Postby Nobbie » 30. January 2023 18:46

SMU wrote:whats next?


De-install MySQL from your Linux Mint Installation. You obviously have MySQL installed in Linux Mint, which collides with Xampps MySQL.
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Re: ERROR 1558 (HY000): Column count of mysql.proc is wrong

Postby SMU » 31. January 2023 08:07

uninstalled MySQL, restarted XAMPP, ran the same code in command line, getting the exact same error, no difference. :(
SMU
 
Posts: 22
Joined: 21. November 2022 08:37
XAMPP version: 8.1.10-0
Operating System: Linux Mint 21

Next

Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 11 guests