Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mariadb:Couldn't execute 'SHOW PACKAGE STATUS WHERE Db='db_name'

Tags:

mysql

mariadb

While taking dump of tables and stored procedure on mariadb 10.2.12, I am getting error mysqldump: Couldn't execute 'SHOW PACKAGE STATUS WHERE Db = 'db_name'': You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'PACKAGE STATUS WHERE Db = 'db_name'

command I am using mysqldump -h hostname -u user -p --routines --triggers --all-databases > MySQLStoredProc.sql

like image 978
Neha Agarwal Avatar asked Sep 19 '18 10:09

Neha Agarwal


1 Answers

Indeed.

On CentOS: "MariaDB-client-10.3.12-1" does not interwork with "MySQL server 5.6.26".

No fear:

What do we have?

rpm --query --all | grep -i maria

Let's go with an older version, 10.2.21, which is "stable".

Available at:

http://mirror.mva-n.net/mariadb//mariadb-10.2.21/yum/rhel7-amd64/

Get the old packages:

wget http://mirror.mva-n.net/mariadb//mariadb-10.2.21/yum/rhel7-amd64/rpms/MariaDB-10.2.19-centos73-x86_64-client.rpm
wget http://mirror.mva-n.net/mariadb//mariadb-10.2.21/yum/rhel7-amd64/rpms/MariaDB-10.2.19-centos73-x86_64-compat.rpm
wget http://mirror.mva-n.net/mariadb//mariadb-10.2.21/yum/rhel7-amd64/rpms/MariaDB-10.2.19-centos73-x86_64-common.rpm

Check the hashsums against the file available at

http://mirror.mva-n.net/mariadb//mariadb-10.2.21/yum/rhel7-amd64/sha256sums.txt

(that's not really good enough, the sums should NOT be on the mirror ... )

Downgrade existing:

rpm -Uvh --oldpackage MariaDB*

And it works for now.

like image 80
David Tonhofer Avatar answered Oct 19 '22 22:10

David Tonhofer