[Bug] Internal database files not updated for MariaDB 10.3.*

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

[Bug] Internal database files not updated for MariaDB 10.3.*

Postby Limeroli » 11. August 2019 11:32

I did not find a bugtracker so I post here to report a bug in XAMPP versions which use MariaDB 10.3.* (currently the bug is present until XAMPP 7.3.8 ).

The problem: it is possible that the following error occurs when working with MariaDB:
Code: Select all
ERROR 1558 (HY000) at line 70781: Column count of mysql.proc is wrong. Expected 21, found 20. Created with MariaDB 100108, now running 100316. Please use mysql_upgrade to fix this error


The cause: XAMPP still uses the old internal database files (e.g. responsible for the table mysql.proc) from MariaDB 10.1.* versions, e.g. for the proc table (note the date):
Code: Select all
root@8b1bb1f1bc83:/# ll /opt/lampp/var/mysql/mysql | grep proc
-rw-rw---- 1 mysql mysql   1108 Nov 24  2015 proc.MYD
-rw-rw---- 1 mysql mysql   4096 Nov 24  2015 proc.MYI
-rw-rw---- 1 mysql mysql   3418 Nov 24  2015 proc.frm
-rw-rw---- 1 mysql mysql   1234 Nov 24  2015 procs_priv.MYD
-rw-rw---- 1 mysql mysql  10240 Nov 24  2015 procs_priv.MYI
-rw-rw---- 1 mysql mysql   2874 Nov 24  2015 procs_priv.frm


This corresponding table has only 20 columns:
Code: Select all
root@8b1bb1f1bc83:/# /opt/lampp/bin/mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 11
Server version: 10.3.16-MariaDB Source distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> USE mysql;
Database changed
MariaDB [mysql]> DESCRIBE proc;
+----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+-----+---------------------+-------------------------------+
| Field                | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Null | Key | Default             | Extra                         |
+----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+-----+---------------------+-------------------------------+
| db                   | char(64)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | NO   | PRI |                     |                               |
| name                 | char(64)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | NO   | PRI |                     |                               |
| type                 | enum('FUNCTION','PROCEDURE')                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | NO   | PRI | NULL                |                               |
| specific_name        | char(64)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | NO   |     |                     |                               |
| language             | enum('SQL')                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | NO   |     | SQL                 |                               |
| sql_data_access      | enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA')                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | NO   |     | CONTAINS_SQL        |                               |
| is_deterministic     | enum('YES','NO')                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | NO   |     | NO                  |                               |
| security_type        | enum('INVOKER','DEFINER')                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | NO   |     | DEFINER             |                               |
| param_list           | blob                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | NO   |     | NULL                |                               |
| returns              | longblob                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | NO   |     | NULL                |                               |
| body                 | longblob                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | NO   |     | NULL                |                               |
| definer              | char(141)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | NO   |     |                     |                               |
| created              | timestamp                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | NO   |     | current_timestamp() | on update current_timestamp() |
| modified             | timestamp                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | NO   |     | 0000-00-00 00:00:00 |                               |
| sql_mode             | set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') | NO   |     |                     |                               |
| comment              | text                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | NO   |     | NULL                |                               |
| character_set_client | char(32)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | YES  |     | NULL                |                               |
| collation_connection | char(32)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | YES  |     | NULL                |                               |
| db_collation         | char(32)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | YES  |     | NULL                |                               |
| body_utf8            | longblob                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | YES  |     | NULL                |                               |
+----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+-----+---------------------+-------------------------------+
20 rows in set (0.001 sec)

but MariaDB 10.3.* requires 21 columns (the new column aggregate is missing).

The solution: if you shipped XAMPP with the correct files for the internal database structure, this problem should be gone.

The workaround: for users currently experiencing this issue, it is sufficient to trigger the mysql update process:
Code: Select all
/opt/lampp/lampp start
/opt/lampp/bin/mysql_upgrade
/opt/lampp/lampp stop

and everything should work as expected :-)

Note: this bug does only affect the Linux version of XAMPP but not the Windows version (for Mac I don't know).
Limeroli
 
Posts: 1
Joined: 11. August 2019 11:09
XAMPP version: 7.3.8
Operating System: Windows 10 (1903) x64

Re: [Bug] Internal database files not updated for MariaDB 10

Postby poulinc » 24. May 2020 17:00

Hi, I am having this issue right now with the latest version of XAMPP for MacOS. I cannot create Stored procedures in MariaDB.
I am not able to run any mysql_upgrade command ("command not found") when I am in the directory (using terminal): /.bitnami/stackman/machines/xampp/volumes/root/bin
I am at a total loss :oops: ... Thanks for helping. Best. C
poulinc
 
Posts: 6
Joined: 24. May 2020 16:56
XAMPP version: 7.4.6
Operating System: Mac OS

Re: [Bug] Internal database files not updated for MariaDB 10

Postby Nobbie » 24. May 2020 18:14

poulinc wrote:I am not able to run any mysql_upgrade command ("command not found") when I am in the directory (using terminal):


Its a virtual drive and its mounted to /opt/lampp. Therefore enter the full path in the terminal:

Code: Select all
/opt/lampp/bin/mysql_upgrade
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: [Bug] Internal database files not updated for MariaDB 10

Postby poulinc » 24. May 2020 18:24

I am actually already in the bin directory and I can see the mysql_upgrade command (when I do a ls of the bin directory) but when I type: mysql_upgrade then I get the following error message: "command not found: mysql_upgrade"
poulinc
 
Posts: 6
Joined: 24. May 2020 16:56
XAMPP version: 7.4.6
Operating System: Mac OS

Re: [Bug] Internal database files not updated for MariaDB 10

Postby Nobbie » 24. May 2020 20:58

poulinc wrote:I am actually already in the bin directory and I can see the mysql_upgrade command (when I do a ls of the bin directory) but when I type: mysql_upgrade then I get the following error message: "command not found: mysql_upgrade"


Yes if course. That is basic Linux knowledge, you have to enter ./mysql_upgrade instead. Linux is not Windows. But /opt/lampp/bin/mysql_upgrade would do it in any case, why dont you follow my advice? You ask for help, but you dont follow the advice. Thats very hard to understand.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: [Bug] Internal database files not updated for MariaDB 10

Postby poulinc » 24. May 2020 22:24

Thanks for taking the time to answer my questions which are probably basic for you but not for me unfortunately... I am trying to follow your advice but I don't know how exactly. Currently I am using Terminal in MacOs to type the command you mentioned: is that even the right tool to use? How do I go about typing the command exactly? I did try your suggestions but I always get an error when I do it in Terminal so I must be doing something wrong from the very start. I wish I could add a screenshot, that would probably clear things up quickly? Appreciate the help.
poulinc
 
Posts: 6
Joined: 24. May 2020 16:56
XAMPP version: 7.4.6
Operating System: Mac OS

Re: [Bug] Internal database files not updated for MariaDB 10

Postby poulinc » 29. May 2020 11:36

I finally got what you meant... It was so easy now that I understand better the tool... I had to use the "Open Terminal" option on XAMPP (stackman_launcher) and run the command you mentioned from THAT terminal window. All good now. Thanks!
poulinc
 
Posts: 6
Joined: 24. May 2020 16:56
XAMPP version: 7.4.6
Operating System: Mac OS

Re: [Bug] Internal database files not updated for MariaDB 10

Postby Berrylycious » 30. October 2020 09:24

Hi,
I have the same problem ERROR 1558 with MariaDB 100414

I am trying to follow the solution that Limoroli suggested but in my terminal after entering the
Code: Select all
/opt/lampp/bin/mysql_upgrade
I have this answer :

Code: Select all
Version check failed. Got the following error when calling the 'mysql' command line client
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
FATAL ERROR: Upgrade failed


New here (programming student) and maybe this thread is too old but I'm searching a solution,
If not the correct place, feel free to help me to redirect
if anybody comes here

Thanks guys
Berrylycious
 
Posts: 1
Joined: 30. October 2020 09:17
XAMPP version: 7.4.10-0
Operating System: Mac os Catalina

Re: [Bug] Internal database files not updated for MariaDB 10

Postby Nobbie » 30. October 2020 12:05

Try to run that command via sudo.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: [Bug] Internal database files not updated for MariaDB 10

Postby kenoli » 31. December 2020 19:27

For others information, I have the non-vm Xampp version installed on macOS Big Sur. I ran mysql_upgrade in the terminal from:

/Applications/XAMPP/xamppfiles/bin

using:

sudo ./mysql_upgrade

and it upgraded mysql and I was able to do an SQL dump, which I had been prevented from doing with the error identified here. Be patient at some points it seemed to be stalled but just needs time to complete the upgrade.

Thanks for the help from others in this discussion.

--Kenoli
kenoli
 
Posts: 25
Joined: 11. May 2009 19:06


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 23 guests