Create dump and restore all databases
I have 2 mariadb servers: please note both are IDENTICAL version installed in UBUNTU
*SOURCE: $ mysql --version mysql Ver 15.1 Distrib 10.3.32-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
*TARGET: $ mysql --version mysql Ver 15.1 Distrib 10.3.32-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
Here is the dump command executed in SOURCE mysqldump --user=root --password=[mypassword] --routines --lock-tables --databases portfolio > /home/sk/mariaDBBackups/portfolio.sql
Here is the restore command executed in TARGET (base) pista@pista-OptiPlex-390:/mariaDBBackups$ mysql -u root -p portfolio < portfolio.sql
And I get syntax errors: ERROR 1064 (42000) at line 1379: 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 '' at line 91
Is there a "compatible" mysqldump command. Kindly let me know what is the problem?
Answer Answered by Daniel Black in this comment.
mysql --version only shows the version of the mysql client.
What does SELECT VERSION() show on both servers?
Are you importing a mariadb generated mysqldump, from/to a MySQL database?