寻觅生命中的那一片浅草......

MySQL:how to ignore errors loading a dump

When we load a dump sql file using the following command:
mysql -uroot -pdbpassword test < /data/mysql.sql
the procedure will stop as it detects an error.
How to make procedure ignore the errors and continue anyway?
There are two kinds of methond can do that.

The first one:use “-f” option
mysql -uroot -pdbpassword -f test < /data/mysql.sql

The second one:access into mysql,and use the “source” command.
mysql -uroot -pdbpassword test
source /data/mysql.sql
exit

References:

http://forums.mysql.com/read.php?28,78316,78316

尚无评论

发表评论

2024年四月
« 5月    
1234567
891011121314
15161718192021
22232425262728
2930