2

when I input

mysql -u root -p XXXX dbname < c:/filename.sql

alway get this error "error 1064 <42000>:" you have an error in your SQL suntax; check the manual that corresponds to your MySql server version for the right syntax to use near .....

what is wrong with this statement?

4

3 回答 3

1

I resolved it using PowerShell:

Get-Content "c:/filename.sql" | .\mysql.exe -uroot -pXXXX dbname

于 2012-08-09T16:10:51.720 回答
0

右边是 C:\Program Files\MySQL\MySQL Server 5.0\bin>mysqldump -u root -p mysql>backup_database.sql 输入密码:********

我的路不对。不应该登录到mysql然后执行那个语句

于 2010-04-26T12:25:25.493 回答
0

这是由于 MySQL 中的保留字,通常是因为版本不匹配。

http://dev.mysql.com/doc/refman/5.1/en/reserved-words.html

于 2010-04-26T11:50:20.333 回答