I work with MySQL Server 5.5 and I have a problem in extracting my database,this is how I used this command:
我使用MySQL Server 5.5,我在提取数据库时遇到问题,这就是我使用这个命令的方法:
mysql> mysqldump -uroot -pkail mybase > C:\Program Files\MySQL\MySQL Server 5.5\b
in\base.sql;
and this is the Error that I get:
这是我得到的错误:
ERROR:
Unknown command '\P'.
ERROR:
Unknown command '\M'.
ERROR:
Unknown command '\M'.
ERROR:
Unknown command '\b'.
Outfile disabled.
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 'mysq
dump -uroot -pkail mybase > C:\Program Files\MySQL\MySQL Server 5.5\bin' at
line 1
how can I resolve the problem and thanks for any help :)
我怎样才能解决问题并感谢任何帮助:)
1 个解决方案
#1
8
Mysqldump should not be executed from within MySQL. It is a separate command.
不应该在MySQL中执行Mysqldump。这是一个单独的命令。
Exit the MySQL console and try it there.
退出MySQL控制台并在那里尝试。
If you look in C:\Program Files\MySQL\MySQL Server 5.5\bin, you'll see mysql.exe, and you'll also see mysqldump.exe. So mysqldump is a completely separate executable from mysql.exe, which is why you run it from the Windows command line, not from the MySQL console.
如果你查看C:\ Program Files \ MySQL \ MySQL Server 5.5 \ bin,你会看到mysql.exe,你也会看到mysqldump.exe。所以mysqldump是一个与mysql.exe完全独立的可执行文件,这就是你从Windows命令行而不是从MySQL控制台运行它的原因。
#1
8
Mysqldump should not be executed from within MySQL. It is a separate command.
不应该在MySQL中执行Mysqldump。这是一个单独的命令。
Exit the MySQL console and try it there.
退出MySQL控制台并在那里尝试。
If you look in C:\Program Files\MySQL\MySQL Server 5.5\bin, you'll see mysql.exe, and you'll also see mysqldump.exe. So mysqldump is a completely separate executable from mysql.exe, which is why you run it from the Windows command line, not from the MySQL console.
如果你查看C:\ Program Files \ MySQL \ MySQL Server 5.5 \ bin,你会看到mysql.exe,你也会看到mysqldump.exe。所以mysqldump是一个与mysql.exe完全独立的可执行文件,这就是你从Windows命令行而不是从MySQL控制台运行它的原因。