mysqldump: [ERROR] unknown variable 'database=test'.


背景:
導出數據庫test庫的test表數據出現報錯信息:mysqldump: [ERROR] unknown variable 'database=test'.

原來是my.cnf參數文件配置了以下內容:
[client]
user=test
port=3306
database=test

將database參數注釋掉,就不再出現報錯。

[root@node01 tmp]# mysqldump -utest -pmysql test test > /tmp/ttt.sql
mysqldump: [Warning] Using a password on the command line interface can be insecure.
Warning: A partial dump from a server that has GTIDs will by default include the GTIDs of all transactions, even those that changed suppressed parts of the database. If you don't want to restore GTIDs, pass --set-gtid-purged=OFF. To make a complete dump, pass --all-databases --triggers --routines --events.

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM