1. 程式人生 > >MySQL5.6警告信息 command line interface can be insecur

MySQL5.6警告信息 command line interface can be insecur

you mysql 5.6 interface lin etc scrip dump 避免 backup

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

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

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

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

1、針對mysql

mysql -u root -pPASSWORD 改成mysql -u root -p 在輸入密碼即可.

2、mysqldump就比較麻煩了,通常都寫在scripts腳本中。

解決方法:

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

vim /etc/mysql/my.cnf

[mysqldump]

user=your_backup_user_name

password=your_backup_password

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

MySQL5.6警告信息 command line interface can be insecur