0

I've backed up all of my mysql databases using this command(I'm running mysql 5 on debian linux) :

mysqldump --user="root" --password="pass" --routines --triggers --events --all-databases > dbs_backup.sql

Then I shutted down my mysql server to change innodb configuration according to this link; After restarting the server, & when I want to import dump output using this command:

mysql -u root -p pass < dbs_backup.sql

I get some syntax errors on middle of this file (it executes lot of queries & some databases imports successfully, but the error occurs only while creating some stored procedures). I wonder why this happens, cause the server has no major change & the dumped databases all was fine & worked well before dumping.
what can cause this problem ???

Ehsan Khodarahmi
  • 4,772
  • 10
  • 60
  • 87
  • Can you show us problem lines? – Devart Oct 23 '12 at 08:20
  • I found the problem! I should not use --routines & even --triggers flags with mysqldump because there is no need to backup them while removing existing innodb log files. If you use those flags to create backup, at recovery time at first make sure that the databases are empty & no trigger or stored procedures already exists on them. – Ehsan Khodarahmi Oct 23 '12 at 19:21

0 Answers0