Symptoms
-
After upgrading MariaDB to 10.6, the service fails to start with:
# service mariadb status
...
mariadbd[32685]: 2022-04-19 6:41:28 0 [ERROR] Can't start server: Bind on TCP/IP port. Got error: 22: Invalid argument
mariadbd[32685]: 2022-04-19 6:41:28 0 [ERROR] Do you already have another server running on port: 3306 ?
mariadbd[32685]: 2022-04-19 6:41:28 0 [ERROR] Aborting -
Plesk is not accessible:
500 PleskExceptionDatabase
DB query failed: SQLSTATE[HY000] [2002] No such file or directory
Cause
MariaDB 10.6 does not allow to bind both ::1
and 127.0.0.1
via the setting bind-address = ::ffff:127.0.0.1
in the file /etc/my.cnf
.
Resolution
- Connect to the Plesk server via SSH.
-
Open the file in a text editor. In this example, we are using the vi editor:
# vi /etc/my.cnf
-
Change the
bind-address
setting from:bind-address = ::ffff:127.0.0.1
to
bind-address = 127.0.0.1
-
Save the changes and close the file.
-
Start the MariaDB service:
# service mariadb restart