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

每日存档 八月 9th, 2010

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

2010年八月
« 7月   9月 »
 1
2345678
9101112131415
16171819202122
23242526272829
3031