MariaDB errors after starting the service #281

Closed
opened 2026-04-05 20:26:28 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @mrtzd on 1/27/2024

CloudPanel version(s) affected

v2.4.1

Description

Here are the logs of maraidb service after start (running on Ubuntu Server 22.04):

Jan 27 19:01:16 ubuntu systemd[1]: Starting MariaDB 10.6.12 database server...
Jan 27 19:01:16 ubuntu mariadbd[241051]: 2024-01-27 19:01:16 0 [Warning] Could not increase number of max_open_files to more than 32768 (request: 65535)
Jan 27 19:01:18 ubuntu systemd[1]: Started MariaDB 10.6.12 database server.
Jan 27 19:01:18 ubuntu /etc/mysql/debian-start[241071]: Upgrading MySQL tables if necessary.
Jan 27 19:01:18 ubuntu /etc/mysql/debian-start[241074]: Looking for 'mariadb' as: /usr/bin/mariadb
Jan 27 19:01:18 ubuntu /etc/mysql/debian-start[241074]: Reading datadir from the MariaDB server failed. Got the following error when executing the 'mysql' command line client
Jan 27 19:01:18 ubuntu /etc/mysql/debian-start[241074]: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Jan 27 19:01:18 ubuntu /etc/mysql/debian-start[241074]: FATAL ERROR: Upgrade failed
Jan 27 19:01:18 ubuntu /etc/mysql/debian-start[241080]: Checking for insecure root accounts.
Jan 27 19:01:18 ubuntu debian-start[241083]: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

I'm using the default configuration on a fresh installation of CloudPanel.

How to reproduce

  1. Install CloudPanel on a fresh installation of Ubuntu Server 22.04. (choose MariaDB 10.11 or 10.6 as the Database Engine)
  2. After the installation has finished restart the mariadb service with systemctl restart mariadb
  3. Check the logs of mariadb service to see the error with systemctl status mariadb

Possible Solution

Ok I've found a possible workaround for this issue. I changed the contents of the /etc/mysql/debian.cnf file like this:

[client]
host     = 127.0.0.1
user     = root
password = your_root_password
socket   = /var/run/mysqld/mysqld.sock

[mysql_upgrade]
host     = 127.0.0.1
user     = root
password = your_root_password
socket   = /var/run/mysqld/mysqld.sock

Additional Context

No response

*Originally created by @mrtzd on 1/27/2024* ### CloudPanel version(s) affected v2.4.1 ### Description Here are the logs of maraidb service after start (running on Ubuntu Server 22.04): ``` Jan 27 19:01:16 ubuntu systemd[1]: Starting MariaDB 10.6.12 database server... Jan 27 19:01:16 ubuntu mariadbd[241051]: 2024-01-27 19:01:16 0 [Warning] Could not increase number of max_open_files to more than 32768 (request: 65535) Jan 27 19:01:18 ubuntu systemd[1]: Started MariaDB 10.6.12 database server. Jan 27 19:01:18 ubuntu /etc/mysql/debian-start[241071]: Upgrading MySQL tables if necessary. Jan 27 19:01:18 ubuntu /etc/mysql/debian-start[241074]: Looking for 'mariadb' as: /usr/bin/mariadb Jan 27 19:01:18 ubuntu /etc/mysql/debian-start[241074]: Reading datadir from the MariaDB server failed. Got the following error when executing the 'mysql' command line client Jan 27 19:01:18 ubuntu /etc/mysql/debian-start[241074]: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) Jan 27 19:01:18 ubuntu /etc/mysql/debian-start[241074]: FATAL ERROR: Upgrade failed Jan 27 19:01:18 ubuntu /etc/mysql/debian-start[241080]: Checking for insecure root accounts. Jan 27 19:01:18 ubuntu debian-start[241083]: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) ``` I'm using the default configuration on a fresh installation of CloudPanel. ### How to reproduce 1. Install CloudPanel on a fresh installation of Ubuntu Server 22.04. (choose MariaDB 10.11 or 10.6 as the Database Engine) 2. After the installation has finished restart the mariadb service with `systemctl restart mariadb` 3. Check the logs of mariadb service to see the error with `systemctl status mariadb` ### Possible Solution Ok I've found a possible workaround for this issue. I changed the contents of the `/etc/mysql/debian.cnf` file like this: ``` [client] host = 127.0.0.1 user = root password = your_root_password socket = /var/run/mysqld/mysqld.sock [mysql_upgrade] host = 127.0.0.1 user = root password = your_root_password socket = /var/run/mysqld/mysqld.sock ``` ### Additional Context _No response_
Sign in to join this conversation.