I created a mysql dump using code below:
sudo mysqldump --all-databases --user=root --password --master-data -create-options > alldatabase.sql
This is to migrate mysql data to a new mysql server.
Then, I tried to restore using code below:
sudo mysql -u root -p < backup.sql
but I get error:
ERROR 1064 (42000) at line 4171: 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 1
I have beat my head against the wall trying to figure this out. Any suggestions?
Both servers are Debian using 10.1.38-MariaDB-0+deb9u1
This error could appear when importing a truncated file. Please make sure that sql file is complete.
When using mysqldump like this there is no error message when disk is full.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With