mysql> mysqldump -h127.0.0.1 -uroot -p test > aa.sql;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'mysql
dump -h127.0.0.1 -uroot -p test > aa.sql' at line 1
我在xp中执行备份命令的错误,请问是什么错误??如何解决
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'mysql
dump -h127.0.0.1 -uroot -p test > aa.sql' at line 1
我在xp中执行备份命令的错误,请问是什么错误??如何解决
在XP下用你的代码测试,没有问题
mysqldump -h127.0.0.1 -uroot -p test dbname > aa.sql;少了数据库名
不应该在mysql命令下,退出你的mysql,
应该在cmd命令下
你需要先进入到WIN XP的DOS命令行环境下,然后执行 c:\xxx\xx\x\mysql 5.1\bin\mysqldump -h127.0.0.1 -uroot -p test > aa.sql;
用全路径吧,这样就没有类似问题了:/usr/local/mysql/bin/mysqldump -h127.0.0.1 -uroot -p test > aa.sql;