• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Problem Plesk MySQL unable to open database file

Status
Not open for further replies.

UserProject

New Pleskian
[Solved] Problem Plesk MySQL unable to open database file

Good afternoon,

We have a problem which appears from nowhere. We wanted to connect to our Plesk back-office :
Server error (code 500): Exception with message 'SQLSTATE[HY000]: General error: 14 unable to open database file' caught at top level.

That's the first time I meet this problem, and I didn't find any clue or information on web.

It seems to be a problem of permission.

I tried several thing :
1 - Check our mysql log at /var/log/mysql and mysql.err & mysql.log from /var/log/ but without success (no information)
2 - relaunch mysql server from command : service mysql stop && service mysql start (no success)
3 - launch mysql with verbose command : /usr/bin/mysql start --verbose
with this response :
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)

4 - Tried bootstraper repair :
Code:
/usr/local/psa/bootstrapper/pp11.5.30-bootstrapper/bootstrapper.sh repair
output :
touch: cannot touch `/var/lib/psa/dumps/mysql.preupgrade.11.5.30-11.5.30.20131114-162725.dump.gz': No space left on device

**** Product repair started.

===> Checking for previous installation ... found.
Started bootstrapper repair procedure. This may take a while.
Certain actions may be skipped if not applicable.

Trying to start service mysql... /usr/sbin/mysqld (pid 3684) is running...
done
Trying to establish test connection... connected
done
Trying to find psa database... version is 011005030
Version is OK, no need to create psa database.
Trying to backup MySQL database...
ERROR while trying to backup MySQL database
Check the error reason(see log file: /tmp/plesk_11.5.30_repair.log), fix and try again

***** problem report *****
ERROR while trying to backup MySQL database
Check the error reason(see log file: /tmp/plesk_11.5.30_repair.log), fix and try again

When I tried to stop & relaunch my mysql server, all database are down.
When I reboot our server, only plesk display the error message (our websites are not affected)

We have down a command, yesterday, on a website directory
Code:
cd /var/www/vhosts/website.com/httpdocs/media
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;

I don't understand where this mess comes from.
Not only plesk are not working, but our email server are dead too...
So far our website are online, so it is not so bad as it looks like...

Have some advice for us ?

Thank you,
Your help is greatly appreciated.

Ilan
 
Last edited:
I also tried :
Code:
mysql  -uadmin -p`cat /etc/psa/.psa.shadow` psa
show databases;

result :
+-------------------------+
| Database |
+-------------------------+
| information_schema |
| apsc |
| atmail |
| billing |
| horde |
| mysql |
| performance_schema |
| phpmyadmin_8pCiHz7o0PmQ |
| phpmyadmin_Tl1fpF6U2o7I |
| phpmyadmin_XDBUGrcPo86b |
| phpmyadmin_egh069lWlNoN |
| phpmyadmin_or89alFXoZbk |
| psa |
| rscorp |
| sitebuilder5 |
| task_manager |
+-------------------------+

So it seems to work in ssh ?!
 
Oh my god, problem solved.

df -h ok
df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
rootfs 1310720 124922 1185798 10% /
/dev/root 1310720 124922 1185798 10% /
/dev 4105393 1502 4103891 1% /dev
none 4105471 913 4104558 1% /run
none 4105471 5 4105466 1% /run/lock
none 4105471 1 4105470 1% /run/shm
/dev/md2 5988352 5988352 0 100% /var

It comes from a php session directory ....

God bless us
 
Status
Not open for further replies.
Back
Top