MYSQL – TO AVOID ‘Warning: Using a password on the

zabbix 使用mysql -uxxx -pxxx -Pxxx的时候,会以下报错mysql

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

报错缘由是mysql 5.6版本增长了密码安全策略,以前版本能够使用的命令行里加上密码就会强制报错,因此使用zabbix lld监控mysql的时候,就会因为收到此报错致使没办法监控。shell

解决方法:vim

# vim my.cnf

[client]
host=localhost
user=dump
password='dump'

新的语句

mysql --defaults-file=~/.my.conf -e 'show global status'
mysqldump --defaults-file=~/.my.conf testing > testing.sql
相关文章
相关标签/搜索