导出 mysql 数据库时出现语法错误

Getting syntax error while exporting mysql database

我在centOS服务器上安装了cPanel试用版,现在已经过期了。所以我无权访问 cPanel 用户和 WHM 登录。

我尝试了以下 mysql> mysqldump -u root –ppassword db_name > db_nametext.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 mysqldump -u root –ppassword db_name > db_name at line 1

感谢您的时间和考虑。

你不能从 mysql shell 运行 mysqldump: mysqldump 不是 SQL 语句而是一个可执行文件,它必须是 运行 来自 linux shell 喜欢 mysql 命令。