你能告诉我这里我做错了什么吗?我的sqldump命令运行不正常吗?
mysqldump -u jim -p mydb mytable --where mycondition="ERROR-5000-JAVA" > /home/jim/issue1.sql
Enter password:
mysqldump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE */ * FROM `mytable` WHERE mycondition=ERROR-5000': Unknown column 'ERROR' in 'where clause' (1054)
答案 0 :(得分:3)
您需要围绕整个--where
选项的引号,以便将值周围的双引号发送给MySQL。
mysqldump -u jim -p mydb mytable --where 'mycondition="ERROR-5000-JAVA"' > /home/jim/issue1.sql