Warning: mysqli_connect(): (HY000/2002)

Started by BeReal, March 11, 2018, 12:47:14 PM

Previous topic - Next topic

BeReal

I have not made any changes myself as a user on the VDS server. I was using PHP versions 5.2 and 5.6 due to the scripters I used.

everything was normal and suddenly I started to get this error. the server company can not help. I have to recover the latest updated database backup.  Thank you from now.

Warning: mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0

Warning: mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/cwpsrv/htdocs/resources/admin/include/functions.php on line 0

Warning: mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0

Warning: mysqli_connect(): (HY000/2002): No such file or directory in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0


Trying to start mysql server, please wait!
Try to restart CentOS Web Panel with command: sh /scripts/restart_cwpsrv

**Check your MySQL root password in: /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php and /root/.my.cnf


Warning: mysqli_error() expects exactly 1 parameter, 0 given in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0
Could not connect:

ecoll

i have the same error

on /var/lib/mysql i have no mysql.sock

when i use putty
mysql start
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2 "No such file or directory")


minetcalin

have the same issue  ...
Just occured out of nowhere this morning

Any soilutions as my client has no db backup

josemnunez

please try to execute this script and tell me how it went


sh /scripts/mysql_pwd_reset

minetcalin

deleted the socket file :
rm -vf /var/lib/mysql/mysql.sock
Then I was getting errors at mysql startup :
Quote2018-06-26 18:08:55 140082288351264 [Note] /usr/sbin/mysqld (mysqld 10.1.26-MariaDB) starting as process 1706 ...
2018-06-26 18:08:55 140082288351264 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.
[root@vps***** ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       9.8G  9.3G   19M 100% /
tmpfs           915M     0  915M   0% /dev/shm

So partition is full : deleted quite a bit. Restarted server
restart mysql : getting different error :
Quote2018-06-26 18:15:26 140368591808544 [ERROR] Can't init tc log
2018-06-26 18:15:26 140368591808544 [ERROR] Aborting
Deleted tc.log
rebooted server : mysql is running, and new tc.log file created

Basically, disk full and could not write to tc.log

vinceent

same i have error now and i don't now how to solved this !!!   can to tell me ?  Tnx very much

vinceent

i delete in "
/etc/var/lib/mysql .
rm -rf .  rm -rf tc.log
after i restart mysql

service mysqld restart
Shutting down MariaDB.. SUCCESS!

and after in . 
cd /scripts/
./image_rebuild_server_config

and all is ok !!!

Igor S.

Quote from: vinceent on June 07, 2019, 11:43:13 AM
i delete in "
/etc/var/lib/mysql .
rm -rf .  rm -rf tc.log
after i restart mysql

service mysqld restart
Shutting down MariaDB.. SUCCESS!


It's the worst way I saw xD



You can ask me to solve any problem with your server for some money in pm  ;)






Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions

Get Fast Support Here
http://centos-webpanel.com/support-services

KYME

I have the same error ,can someone guide us how to fix it, please.

Igor S.

Quote from: KYME on July 07, 2019, 05:15:23 PM
I have the same error ,can someone guide us how to fix it, please.

Just ask to see a competent sysadmin. Sometimes can help deleting /var/lib/mysql/ib_logfile0 and /var/lib/mysql/ib_logfile1, sometimes can't and must be investigated.



You can ask me to solve any problem with your server for some money in pm  ;)






Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions

Get Fast Support Here
http://centos-webpanel.com/support-services