• 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

Issue DB query failed: SQLSTATE[HY000] [2002] No such file or directory

jeppestaerk

New Pleskian
Hello guys :)

Doing a backup i ran out of space, i have freed up space on the hdd now.
But i can't log in to pleask admin site, i get the error:

---
Server Error

500 Plesk\Exception\Database​

DB query failed: SQLSTATE[HY000] [2002] No such file or directory
---

I have tried to ssh into the server and restart and run the command
Code:
systemctl restart mysql
but it fails with
Code:
Failed to start MariaDB 10.1.47 database server.

Code:
Feb 16 11:12:41 server1 sw-engine-pleskrun[9816]: [2021-02-16 11:12:41.187] ERR [panel] DB query failed: SQLSTATE[HY000] [2002] No such file or directory:
Feb 16 11:12:41 server1 sw-engine-pleskrun[9816]: 0: /opt/psa/admin/plib/Db/Adapter/Pdo/Mysql.php:64
Feb 16 11:12:41 server1 sw-engine-pleskrun[9816]:         Db_Adapter_Pdo_Mysql->query(string 'SET sql_mode = ''')
Feb 16 11:12:41 server1 sw-engine-pleskrun[9816]: 1: /opt/psa/admin/plib/CommonPanel/Application/Abstract.php:103
Feb 16 11:12:41 server1 sw-engine-pleskrun[9816]:         CommonPanel_Application_Abstract::initDbAdapter()
Feb 16 11:12:41 server1 sw-engine-pleskrun[9816]: 2: /opt/psa/admin/plib/Session/Helper.php:176
Feb 16 11:12:41 server1 sw-engine-pleskrun[9816]:         Plesk\Session\Helper::initStorage()
Feb 16 11:12:41 server1 sw-engine-pleskrun[9816]: 3: /opt/psa/admin/plib/CommonPanel/Application/Abstract.php:52
Feb 16 11:12:41 server1 sw-engine-pleskrun[9816]:         CommonPanel_Application_Abstract->run()
Feb 16 11:12:41 server1 sw-engine-pleskrun[9816]: 4: /opt/psa/admin/plib/CommonPanel/Application/Abstract.php:34
Feb 16 11:12:41 server1 sw-engine-pleskrun[9816]:         CommonPanel_Application_Abstract::init()
Feb 16 11:12:41 server1 sw-engine-pleskrun[9816]: 5: /opt/psa/admin/plib/pm/Bootstrap.php:16
Feb 16 11:12:41 server1 sw-engine-pleskrun[9816]:         pm_Bootstrap::init()
Feb 16 11:12:41 server1 sw-engine-pleskrun[9816]: 6: /opt/psa/admin/plib/sdk.php:11
Feb 16 11:12:41 server1 sw-engine-pleskrun[9816]:         require_once(string '/opt/psa/admin/plib/sdk.php')
Feb 16 11:12:41 server1 sw-engine-pleskrun[9816]: 7: /opt/psa/admin/plib/WebSocket/bin/ws-server.php:3
Feb 16 11:12:41 server1 sw-engine-pleskrun[9816]: ERROR: Plesk\Exception\Database: DB query failed: SQLSTATE[HY000] [2002] No such file or directory (Mysql.php:64)

I have also tried to run
Code:
plesk repair db -y
and get the error:
Code:
DB query failed: SQLSTATE[HY000] [2002] No such file or directory

exit status 1

Can anyone point me in any direction to solve the issue?
 
# mkdir /var/log/mariadb
# chown mysql:mysql /var/log/mariadb
# systemctl start mariadb
 
it is missing as well. ?
Code:
root@server1:/var/log# cd /var/log/messages
-bash: cd: /var/log/messages: No such file or directory
root@server1:/var/log# cat /var/log/messages
cat: /var/log/messages: No such file or directory
 
Hmm... Have you deleted the entire /var/log directory?
I'm afraid in this case you broke the whole system.
 
No not at all, i have run the this commands to free up space
Code:
root@server1:/var/log# history | grep rm
  363  find /var/log/plesk/PMM/ -name 'backup*' -type d -exec rm -rf {} +;
  365  find /var/lib/psa/dumps -name 'backup*' -type f -exec rm -rf {} +;
  369  find /tmp -type f -mtime +14 -exec rm {} \;
  371  find /var/tmp -type f -mtime +14 -exec rm {} \;
  372  rm -rf /usr/local/psa/PMM/tmp/* /usr/local/psa/tmp/*
 
Content of /var/log
 

Attachments

  • Screenshot 2021-02-16 at 12.13.09.png
    Screenshot 2021-02-16 at 12.13.09.png
    538 KB · Views: 15
  • Screenshot 2021-02-16 at 12.13.16.png
    Screenshot 2021-02-16 at 12.13.16.png
    562.4 KB · Views: 15
  • Screenshot 2021-02-16 at 12.13.23.png
    Screenshot 2021-02-16 at 12.13.23.png
    560.9 KB · Views: 13
Back
Top