MariaDB suspicious Access denied during `debian-start` and then FATAL ERROR: Upgrade failed

On a seemingly working server you may encounter the following checking out the mysql status:

Jun 15 10:32:33 host systemd[1]: Starting MariaDB 10.3.39 database server...
Jun 15 10:32:34 host systemd[1]: Started MariaDB 10.3.39 database server.
Jun 15 10:32:34 host /etc/mysql/debian-start[15144]: Looking for 'mysql' as: /usr/bin/mysql
Jun 15 10:32:34 host /etc/mysql/debian-start[15144]: Reading datadir from the MariaDB server failed. Got the following error when executing the 'mysql' command line client
Jun 15 10:32:34 host /etc/mysql/debian-start[15144]: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Jun 15 10:32:34 host /etc/mysql/debian-start[15144]: FATAL ERROR: Upgrade failed
Jun 15 10:32:34 host debian-start[15153]: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

Correlating the time with actual actions, it becomes clear to you that this error happened on startup, as mentioned by the debian-start tag.

Next you decide to upgrade innodb_buffer_pool_size. Again you restart, and this time there is more verbose information:

Jun 15 10:32:33 host systemd[1]: Starting MariaDB 10.3.39 database server...
Jun 15 10:32:34 host systemd[1]: Started MariaDB 10.3.39 database server.
Jun 15 10:32:34 host /etc/mysql/debian-start[15144]: Looking for 'mysql' as: /usr/bin/mysql
Jun 15 10:32:34 host /etc/mysql/debian-start[15144]: Reading datadir from the MariaDB server failed. Got the following error when executing the 'mysql' command line client
Jun 15 10:32:34 host /etc/mysql/debian-start[15144]: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Jun 15 10:32:34 host /etc/mysql/debian-start[15144]: FATAL ERROR: Upgrade failed
Jun 15 10:32:34 host debian-start[15153]: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

Ouch! It seems Maria can’t upgrade herself. What next?

To be honest, I use AI to check, and it’s messy. Leave us a comment if you have any advice.

 

Share this article

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top