mysql去掉明文密码不安全提示

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

[yeemiao@yeemiao-oracle-9e96168-prd scripts]$ more /etc/zabbix/scripts/check_user_count.sh
#!/bin/bash
mysql --host=host01 --user=root --port=3306 -ptesttest -D db_test -N<<eof
select max(id) as usercnt from user_info;
exit
eof


#!/bin/bash
/etc/zabbix/scripts/check_user_count.sh 2>/dev/null

posted @ 2021-01-07 15:45  slnngk  阅读(645)  评论(0)    收藏  举报