mysqli::real_connect(): (HY000/2002): No such file or directory
I'm using phpmyadmin 5.0
mysql 5.5.62
Litespeed + php 7.4
mysqli::real_connect(): (HY000/2002): No such file or directory
I'm using phpmyadmin 5.0
mysql 5.5.62
Litespeed + php 7.4
Hello anhdao1520
What is the operating system distribution you are using? Have you tried reinstalling openlitespeed and php74
aaPanel_Jose CentOS 7.8.2003
No, I haven't tried reinstalling, because the server is working properly
aaPanel_Jose
I'm was change
$cfg['Servers'][$i]['host'] = 'localhost';
to
$cfg['Servers'][$i]['host'] = '127.0.0.1';
problem is fixed.
can confirm i had the same issue using same installation, phpmyadmin 5.0, litespeed + php7.4 and mariadb 10.4 (centos 8) and the solution shared worked for me.
switch on phpmyadmin config.inc
$cfg['Servers'][$i]['host'] = 'localhost';
to
$cfg['Servers'][$i]['host'] = '127.0.0.1';
also using wordpress i had to switch on wpconfig.php from localhost to 127.0.0.1
my /etc/hosts file have configured
127.0.0.1 localhost
donko anhdao1520
Thanks for the information you provided, let me test it
Okay, I have had this happen a number of times now as well, and I do believe they have all been with OLS. I am using Debian 10 BTW, and it was working fine, went for e reboot for something else, and broke. Can we get a fix for this? Seems like something that shouldn't be too hard.
gacott
This problem should be caused by the created mysql sock soft link and then deleted after restarting, let me check again
Ok, i think im having the same issue. i have centos 8. All was good and the one day i had to create a new website and using the installation script i get this error> Database connection failed: SQLSTATE[HY000] [2002] No such file or directory
My other websites work fin without any sql problems.... any ideas how to fix or should i just uninstall php 7.4 and mysql ?
Can I log into your panel to check it?
If you can, please send the panel login information to jose@aapanel.com
Solution is to change the php config. Make sure you have the following lines:
pdo_mysql.default_socket = /tmp/mysql.sock
mysqli.default_socket = /tmp/mysql.sock
Have the same problem mit Centos8, OLS und MariaDB.
The Workaround with using 127.0.0.1 works, but when is it going to be fixed by default?
neotheghost
Hello, I think your problem is a problem with php's function of handling mysql, from a deeper level your website code is written with a lower version of php so that it is not compatible with the current version of php and MySQL
I'm using php 7.4
Both, Wordpress and phpmyadmin that have the problem, should be 100% compatible with php7.4
Might MariaDB 10.5 be the problem?
aapanel_power
I'm using php 7.3, openlitespeed, mariadb10.7.3, phpmyadmin5.0, ubuntu20.04. Still got this problem, fix it please.
x3inspire
Hello, it is recommended to check whether mariadb is running.
Check whether the /tmp/mysql.sock file exists
yes mariadb is running.
and /tmp/mysql.sock also exist.
x3inspire
Hi, can you give us your aapanel information? The server makes a snapshot backup first, if possible, please send it to kern@aapanel.com.
It is recommended to fill in the following
Post link:
SSH IP address, account password and port:
aapanel login link address and account password:
No post link will not be able to know which user's information is
admin, i need your help, i have problem with it.
I checked and my mysql.sock file has .lock added at the end. When I open the file, there are only lines like the image I uploaded. Can anyone help me how to fix it?