• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question MySQL: Constant 'Access Denied' messages in mysql log

Paul Larson

Basic Pleskian
Running Obsidian 18.0.35 on Ubuntu 20.04.2 LTS. I'm noticing constant rows in the log:


[Warning] Access denied for user ''@'localhost' (using password: NO)

It may not be a Plesk thing at all. It just stood out to me, particularly the lack of username. Not really sure how to get at this with the Firewall or Fail2Ban, which already blocks external MySQL traffic w/ the Firewall settings.
 
Running Obsidian 18.0.35 on Ubuntu 20.04.2 LTS. I'm noticing constant rows in the log:
[Warning] Access denied for user ''@'localhost' (using password: NO)
....
Where / Which log / Log location etc?
We're using what appears to be a similar setup to the one you're using, but without ever seeing that warning.
What can you see, if you if you use this selective log extract:
# journalctl --unit=mariadb.service -n 100 --no-pager
 
Sorry, log file was:

/var/log/mysql/error.log

Probably oversharing here:

Code:
-- Reboot --
Jun 07 14:20:42 localhost systemd[1]: Starting MariaDB 10.3.29 database server...
Jun 07 14:20:44 my-hostname mysqld[1213]: 2021-06-07 14:20:44 0 [Note] /usr/sbin/mysqld (mysqld 10.3.29-MariaDB-0ubuntu0.20.04.1) starting as process 1213 ...
Jun 07 14:20:45 my-hostname systemd[1]: Started MariaDB 10.3.29 database server.
Jun 07 14:20:45 my-hostname /etc/mysql/debian-start[1959]: Upgrading MySQL tables if necessary.
Jun 07 14:20:45 my-hostname /etc/mysql/debian-start[1964]: Looking for 'mysql' as: /usr/bin/mysql
Jun 07 14:20:45 my-hostname /etc/mysql/debian-start[1964]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
Jun 07 14:20:45 my-hostname /etc/mysql/debian-start[1964]: This installation of MySQL is already upgraded to 10.3.29-MariaDB, use --force if you still need to run mysql_upgrade
Jun 07 14:20:45 my-hostname /etc/mysql/debian-start[2094]: Checking for insecure root accounts.
Jun 07 15:01:03 my-hostname systemd[1]: Stopping MariaDB 10.3.29 database server...
Jun 07 15:01:05 my-hostname systemd[1]: mariadb.service: Succeeded.
Jun 07 15:01:05 my-hostname systemd[1]: Stopped MariaDB 10.3.29 database server.
Jun 07 15:01:05 my-hostname systemd[1]: Starting MariaDB 10.3.29 database server...
Jun 07 15:01:05 my-hostname mysqld[8628]: 2021-06-07 15:01:05 0 [Note] /usr/sbin/mysqld (mysqld 10.3.29-MariaDB-0ubuntu0.20.04.1) starting as process 8628 ...
Jun 07 15:01:06 my-hostname systemd[1]: Started MariaDB 10.3.29 database server.
Jun 07 15:01:06 my-hostname /etc/mysql/debian-start[8667]: Upgrading MySQL tables if necessary.
Jun 07 15:01:06 my-hostname /etc/mysql/debian-start[8670]: Looking for 'mysql' as: /usr/bin/mysql
Jun 07 15:01:06 my-hostname /etc/mysql/debian-start[8670]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
Jun 07 15:01:06 my-hostname /etc/mysql/debian-start[8670]: This installation of MySQL is already upgraded to 10.3.29-MariaDB, use --force if you still need to run mysql_upgrade
Jun 07 15:11:26 my-hostname systemd[1]: Stopping MariaDB 10.3.29 database server...
Jun 07 15:11:28 my-hostname systemd[1]: mariadb.service: Succeeded.
Jun 07 15:11:28 my-hostname systemd[1]: Stopped MariaDB 10.3.29 database server.
Jun 07 15:11:28 my-hostname systemd[1]: Starting MariaDB 10.3.29 database server...
Jun 07 15:11:28 my-hostname mysqld[9312]: 2021-06-07 15:11:28 0 [Note] /usr/sbin/mysqld (mysqld 10.3.29-MariaDB-0ubuntu0.20.04.1) starting as process 9312 ...
Jun 07 15:11:29 my-hostname systemd[1]: Started MariaDB 10.3.29 database server.
Jun 07 15:11:29 my-hostname /etc/mysql/debian-start[9352]: Upgrading MySQL tables if necessary.
Jun 07 15:11:29 my-hostname /etc/mysql/debian-start[9356]: Looking for 'mysql' as: /usr/bin/mysql
Jun 07 15:11:29 my-hostname /etc/mysql/debian-start[9356]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
Jun 07 15:11:29 my-hostname /etc/mysql/debian-start[9356]: This installation of MySQL is already upgraded to 10.3.29-MariaDB, use --force if you still need to run mysql_upgrade
Jun 07 15:11:29 my-hostname /etc/mysql/debian-start[9372]: Checking for insecure root accounts.
 
@Paul Larson The issue in your log, is related to the setup(s) of that specific user / database (when being used within Plesk...). Mainly due to security reasons, Plesk have their own criteria & rules etc for user 'admin' / 'root' / '' @'localhost' but there are variables within those too, depending on your own server setup. Fortunately, there's a lot of existing, detailed Plesk articles / support docs on how this should be setup correctly / changes that can be applied etc. Once correct (within Plesk...) only the normal, expected log entries will then appear, but obviously, those would be specific to your own database setup / chosen parameters etc. If you patiently work through all of those Plesk articles / support docs, you will be able to correct this and thus remove those security warnings / log entries
 
Last edited:
Back
Top