When I start/restart the mysql service, I always see this row in the log:
2017-07-19T17:35:02.379166Z 5 [Note] Access denied for user 'root'@'localhost' (using password: NO)
What is it trying to do? And how can I set the user/password/host for this operation? (it should be 127.0.0.1
and not localhost
because I have skip_name_resolve=1
)
I already have a .my.cnf in my home folder, but mysql is running under the mysql user, so should I create a .my.cnf file in the mysql home? Would this be safe?
I'm using a Percona Server 5.7
This is because the mysqladmin cannot login as root.
The guilty is this Systemd unit:
Which executes this command to see if the daemon is started properly:
Which executes:
The return value is 0 despite the error message so the daemon is marked as started.
Debian has a file which contains an user to execute unattended operations, to use this file explicitely the previous command must be executed in this manner:
After this explanation I can ignore the line in the error log.