S
S
Sergey2020-01-10 18:09:05
linux
Sergey, 2020-01-10 18:09:05

How to suppress MySQL warning?

Good evening, I am writing a script in bash and ran into a problem in the form of a warning when executing MySQL commands.
View warning:

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

When running the command:
mysql -uroot -p123456789 -e "GRANT SELECT, INSERT, UPDATE, DELETE ON phpmyadmin.* TO 'pma'@'localhost' IDENTIFIED BY '123456789';";

Suppress tried in vain with:
> /dev/null 2>&1
Searched some google and from reasonable answers, use mysql_config_editor. Are there ways to suppress the warning without resorting to it? :)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vladislav, 2020-01-10
@t3g1ng

I can advise a stupid solution (crutch) if you are just annoyed by the message:
5e18dd3a56dea725454314.jpeg

V
Victor Taran, 2020-01-10
@shambler81

How to solve MySQL login problem?

L
Lev Zabudkin, 2020-01-15
@zabudkin

mysql -uroot -p123456789 --silent -e "GRANT SELECT, INSERT, UPDATE, DELETE ON phpmyadmin.* TO 'pma'@'localhost' IDENTIFIED BY '123456789';" 2>nul

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question