596   MySQL

Problem

[root@~]# mysqldump -u username -p -h 10.123.456.789 -P 3306  database > ~/database.sql
Enter password: 
mysqldump: Couldn't execute 'SET OPTION SQL_QUOTE_SHOW_CREATE=1': Unknown system variable 'OPTION' (1193)

Reason

MySQL’s bug between defferent version

Solution

Edit mysqldump binary, replace OPTION with six space

[root@~]# sed  's/OPTION/      /g'  /usr/bin/mysqldump > /usr/bin/mysqldump_new
[root@~]# chmod +x /usr/bin/mysqldump_new
[root@~]# mysqldump_new -u username -p -h 10.123.456.789 -P 3306  database > ~/database.sql



Leave a Reply

Your email address will not be published. Required fields are marked *