mysql> mysql dump -uroot -p yqfx > outfile.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 -uroot -p yqfx > outfile.sql' at line 1yqfx是要导出的数据库,-p后加上密码也是如此,包括用 source命令是也总提示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 -uroot -p yqfx > outfile.sql' at line 1yqfx是要导出的数据库,-p后加上密码也是如此,包括用 source命令是也总提示SQL语句错误,请问是怎么回事呀,
我是刚开始学,谢了!
mysqldump 在 shell 下面直接执行(系统里面直接执行)。
mysqldump -uroot -p yqfx > outfile.sql;
source 进入数据库命令行后执行,但是文件必须在当前目录。
Enter password:
root@zhoujy:/home/zhoujy# mysql -uroot -p -s
Enter password:
root@localhost : (none) 11:01:02>use test
root@localhost : test 11:01:06>source test.sql
root@localhost : test 11:01:13>