Link to home
Start Free TrialLog in
Avatar of G F
G FFlag for Canada

asked on

Restore Of MySQL/MariaDB using MySQLDump does not work


I'm running MariaDB with HeidiSQL management software, and I want to move my databases to another system, using the same version of MariaDB and Heidi.

I'm using mysqldump to copy the database, and using this command:

C:\Program Files\MariaDB 10.4\bin>mysqldump -u root -p bbb > d:\database\bds2.sql

However when I want to restore, it seems to work okay, the command runs, but when I check Heidi, the tables are not there.  I use this command to restore:

C:\Program Files\MariaDB 10.4\bin>mysqldump -u root -p bbb < d:\database\bds2.sql

The database on the target system has a database named bbb, though a different pw than the original host.
I've restarted the mariadb service and the Heidi software, just in case there was a glitch but there is nothing.

My development system was Windows 10 and the target system is Windows 7.

The size of the backup file is about 27Kb, and in Heidi the empty tables are about 450Kb.

The Mysqldump restore does have an output when run, like a Header with information like the Host and DB server and Maria version number, then it has a couple dozen lines about 'SET'.  It doesn't say anything other than that.

Am I missing something on the backup and restore?  Should I use something different?

Thank you in advance!
Avatar of noci

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of G F


Thank you noci!

That worked great!
The tables are all there. :)
Avatar of noci

The set options are all comments for regular SQL, they ARE interpreted by mysql command depending on versions of mysql.. where they can make a difference and mysqldump still delivers a valid .SQL script.