MySQL 5.6 警告信息 command line interface can be insecure 修復



MySQL 5.6 警告信息 command line interface can be insecure 修復mysql


在命令行輸入密碼,就會提示這些安全警告信息。sql

Warning: Using a password on the command line interface can be insecure.vim


注: mysql -u root -pPASSWORD 或 mysqldump -u root -pPASSWORD 都會輸出這樣的警告信息.安全

一、針對mysqlide

mysql -u root -pPASSWORD 改爲mysql -u root -p 在輸入密碼便可.命令行


二、mysqldump就比較麻煩了,一般都寫在scripts腳本中。ip


解決方法:it

對於 mysqldump 要如何避免出現(Warning: Using a password on the command line interface can be insecure.) 警告信息呢?class


vim /etc/mysql/my.cnf配置

[mysqldump]

user=your_backup_user_name

password=your_backup_password


修改完配置文件後, 只須要執行mysqldump 腳本就能夠了。備份腳本中不須要涉及用戶名密碼相關信息。

相關文章
相關標籤/搜索