• 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
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

PleskFatalException Unable to connect to database: mysql_connect()

MoL

New Pleskian
Hi !

The sites works perfect long time after i made update from Plesk Panel 10 to 11 and then disappeared - and when i want to enter in my Plesk Panel page appear:
" ERROR: PleskFatalException
Unable to connect to database: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: No such file or directory

0: common_func.php3:153
psaerror(string 'Unable to connect to database: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: No such file or directory')
1: auth.php3:116
" .

I tried via SSH with this and another com. but nothing

The first error it was on SSH cmp this : /etc/init.d/mysql: ERROR: The partition with /var/lib/mysql is too full! ... failed!

for this i delete 2Gb from server part. but nothing.

and then i tried with:

mysql -uadmin -p'cat /etc/psa/.psa.shadow 'psa
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

or

mysql -uadmin -p'cat/etc/psa/.psa.shadow'psat
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
root@www ~ # service mysql status
mysql: unrecognized service
root@www ~ # service mysql start
mysql: unrecognized service
root@www ~ # /usr/local/psa/bin/admin --show-password
Unable to connect to database:


Only this option works: apt-get update

Can help me pls ? for can connect to mysql server anybody pls?

Thanks in advance !
 
yes"

root@www ~ # df -h
Filesystem Size Used Avail Use% Mounted on
/dev/md2 368G 366G 0 100% /
tmpfs 991M 0 991M 0% /lib/init/rw
udev 986M 168K 985M 1% /dev
tmpfs 991M 0 991M 0% /dev/shm
/dev/md1 496M 28M 443M 6% /boot
overflow 1.0M 8.0K 1016K 1% /tmp
 
Ps:

After i delete many backaup folder the space hdd it,s ok now:

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/md2 368G 59G 291G 17% /
tmpfs 991M 0 991M 0% /lib/init/rw
udev 986M 168K 985M 1% /dev
tmpfs 991M 0 991M 0% /dev/shm
/dev/md1 496M 28M 443M 6% /boot

-------------------------------------------------------------
For see alll services /etc/init.d/psa start

Starting xinetd service... done
Starting mysql service... failed
Trying to connect to MySQL... Failed to connect to MySQL: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)

ERROR while trying to
Check the error reason(see log file: /tmp/plesk_11.0.9_reset_instance_data.log), fix and try again

Starting bind9 service... done
Starting postgresql service... not installed
Starting psa-spamassassin service... done
Plesk: Starting Mail Server... already started
Starting psa... done


BUT I DÓNT FOUND the file mysqld.sock in /var/run/mysqld/mysqld.sock How i can obtain this file...?
-----------------------------------------------------------------------
When i put:

service mysql start
mysql: unrecognized service

and on Plesk Panel page appaire same:

ERROR: PleskFatalException
Unable to connect to database: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Connection refused

0: common_func.php3:153
psaerror(string 'Unable to connect to database: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Connection refused')
1: auth.php3:116

Can somebody help me pls.

Thanks!
 
Last edited:
Check the error reason(see log file: /tmp/plesk_11.0.9_reset_instance_data.log), fix and try again

Have you checked this log?
 
Hi Igor and tks

yes

START Doing reset_instance_data --psa-init AT Wed Dec 4 23:53:20 EET 2013

ERROR while trying to
Check the error reason(see log file: /tmp/plesk_11.0.9_reset_instance_data.log), fix and try again

START Doing reset_instance_data --psa-init AT Thu Dec 5 00:05:48 EET 2013

ERROR while trying to
Check the error reason(see log file: /tmp/plesk_11.0.9_reset_instance_data.log), fix and try again
 
Try to restart mysql server manually with

# /etc/init.d/mysqld stop
# /etc/init.d/mysqld start

and check error messages in /var/log/mysqld.log
 
Back
Top