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 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:

ExecStartPost=/usr/share/mysql/mysql-systemd-start post

Which executes:

# mysqladmin ping         
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
# echo $?

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:

mysqladmin --defaults-file=/etc/mysql/debian.cnf ping

After this explanation I can ignore the line in the error log.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.