3

I have a number of large BASH scripts which execute queries against a MySQL database. When running these scripts on MYSQL version 5.7.17, I get the following error'

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

I have tried suppressing all warnings globally by adding LOG_WARNINGS = 0 under [mysqld] in the /etc/my.cnf file. Unfortunately MYSQL doesn't restart after making that change.

I have also tried run the command SET GLOBAL LOG_WARNINGS=0 from the command line. Aftre MYSQL restarts the warning is still displayed.

Any ideas?

dimo414
  • 44,897
  • 17
  • 143
  • 228
user1654528
  • 365
  • 2
  • 12
  • The referenced Duplicate only offers an answer to suppress the warnings via the command line. I am asking for a method to globally suppress warning messages without having to change any of my BASH code. – user1654528 Jan 13 '17 at 11:35
  • I removed close votes with this duplicate: [Suppress warning messages using mysql from within Terminal, but password written in bash script](http://stackoverflow.com/q/20751352/3776858). – Cyrus Jan 13 '17 at 11:42

0 Answers0