Applicable to:
- Plesk for Linux
Symptoms
-
Unable to log into Plesk with the following error:
Server Error
500 Plesk\Exception\Database
DB query failed: SQLSTATE[HY000] [2002] No such file or directory
Type Plesk\Exception\Database
Message DB query failed: SQLSTATE[HY000] [2002] No such file or directory
File Mysql.php
Line 64 -
The following error messages can be found in
/var/log/messages
:Jan 28 14:49:37 hostname systemd: Starting MariaDB database server...
Jan 28 14:49:37 hostname mariadb-prepare-db-dir: The directory /var/log/mariadb does not exist.
Jan 28 14:49:37 hostname systemd: mariadb.service: control process exited, code=exited status=1
Jan 28 14:49:37 hostname systemd: Failed to start MariaDB database server.
Cause
Directory /var/log/mariadb
is missing on the server.
Resolution
-
Connect to the server via SSH.
-
Create the directory
/var/log/mariadb
:# mkdir /var/log/mariadb
-
Assing correct user and group:
# chown mysql:mysql /var/log/mariadb
-
Start MariaDB:
# systemctl start mariadb
Comments
6 comments
f
f
root@hopeful-khorana:~# mkdir /var/log/mariadb
root@hopeful-khorana:~# chown mysql:mysql /var/log/mariadb
root@hopeful-khorana:~# systemctl start mariadb
Failed to start mariadb.service: Unit mariadb.service not found.
xxxx:~# mkdir /var/log/mariadb
mkdir: cannot create directory ‘/var/log/mariadb’: File exists
xxxx:~# chown mysql:mysql /var/log/mariadb
xxxx:~# systemctl start mariadb
Failed to start mariadb.service: Unit mariadb.service failed to load: No such file or directory.
no se ha reparado el error. Todo sigue igual el directorio ya exite pero no arranca el servicio mariadb
Al mirar el estado de mariadb.... dice DEAD. que ha pasado??
● mariadb.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
Sep 02 20:27:48 vps536206.ovh.net systemd[1]: Cannot add dependency job for unit mariadb.service, ignoring...ory.
Sep 02 20:27:54 vps536206.ovh.net systemd[1]: Cannot add dependency job for unit mariadb.service, ignoring...ory.
Sep 02 20:27:59 vps536206.ovh.net systemd[1]: Cannot add dependency job for unit mariadb.service, ignoring...ory.
Sep 02 20:28:04 vps536206.ovh.net systemd[1]: Cannot add dependency job for unit mariadb.service, ignoring...ory.
Sep 02 20:28:09 vps536206.ovh.net systemd[1]: Cannot add dependency job for unit mariadb.service, ignoring...ory.
Sep 02 20:28:15 vps536206.ovh.net systemd[1]: Cannot add dependency job for unit mariadb.service, ignoring...ory.
Sep 02 20:28:20 vps536206.ovh.net systemd[1]: Cannot add dependency job for unit mariadb.service, ignoring...ory.
Sep 02 20:28:25 vps536206.ovh.net systemd[1]: Cannot add dependency job for unit mariadb.service, ignoring...ory.
Sep 02 20:28:30 vps536206.ovh.net systemd[1]: Cannot add dependency job for unit mariadb.service, ignoring...ory.
Sep 02 20:28:36 vps536206.ovh.net systemd[1]: Cannot add dependency job for unit mariadb.service, ignoring...ory.
This is the error I'm getting after this command.
And this is the journalctl -xe response
500 Plesk\Exception\Database
DB query failed: SQLSTATE[HY000] [2002] No such file or directory
[root@server ~]# mkdir /var/log/mariadb
mkdir: cannot create directory ‘/var/log/mariadb’: File exists
[root@server ~]# chown mysql:mysql /var/log/mariadb
[root@server ~]# systemctl start mariadb
Failed to start mariadb.service: Unit mariadb.service not found.
Please sign in to leave a comment.