MENU

ubuntu18.04 备份 mysql 数据库报 ERROR 1064 (42000) 错误

February 21, 2019 • Read: 13547 • 常见报错

完整的 bug 信息:

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 -uroot -p ylt>ylt.sql' at line 1

错误原因是我误以为 mysqldum 是 sql 命令,错误写入了 mysql 命令中

mysql> mysqldump -uroot -p ylt>ylt.sql;

后才发觉 mysqldump 是 linux 命令

遂退出 mysql,在终端写入

[root@localhost ~]# mysqldump -uroot -p ylt>ylt.sql

这样就对了

兼总条贯 知至知终

无标签