Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mute a mysql warning message: mysql: [Warning] Using a password on the command line interface can be insecure

The MYSQL 5.6 & 5.7 keeps showing an annoying message

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

in the vagrant/cygwin/ local environment's command line. If I run it in an Amazon EC2 instance with a command line, the MySQL won't return this warning at all. Is there any way to turn off this warning? Thanks!

like image 407
Chubaka Avatar asked Sep 18 '25 14:09

Chubaka


1 Answers

I was also seeking for a solution for this . All I could come up with was:

mysql -u root -p"password" 2>/dev/null
like image 161
Krischu Avatar answered Sep 21 '25 13:09

Krischu