Avatar of G F
G F
Flag for Canada asked on

Restore Of MySQL/MariaDB using MySQLDump does not work

Hi,

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!
* MariaDBDatabasesMySQL Server

Avatar of undefined
Last Comment
noci

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
noci

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
G F

ASKER
Thank you noci!

That worked great!
The tables are all there. :)
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.
Your help has saved me hundreds of hours of internet surfing.
fblack61