MySQL去掉mysql: [Warning] Using a password on the command line interface can be insecure.

去掉mysql: [Warning] Using a password on the command line interface can be insecure.

5.7版本使用mysql执行sql命令都会有这行,去掉方法重定向

echo "select version()"|mysql -S /tmp/mysql3306.sock -uroot -ppassword 2>/dev/null

 

posted @ 2021-04-12 16:44  paul_hch  阅读(446)  评论(0编辑  收藏  举报