Mysql stopped working on my server, I can login in shell and browse databases, but I can't connect using php.
What can I do? I restarted server several times, mysql and httpd also, doesn't work :(
Jakiao
08-12-2004, 12:26 AM
Check and see if something is binding to the mySQL port.
netstat -nlp | grep 3306
If something is running, kill it and investigate.
Also, be sure to check /var/log/messages to see if there is any [error] or [critical] messages.
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 9795/mysqld
Jakiao
08-12-2004, 12:38 AM
killall -9 mysqld
Run that until is says
mysqld: no processes killed
Then try to start mySQL again.
I also found this warning message in mysqld.log
Warning: Asked for 196608 thread stack, but got 126976
never had it before
Jakiao
08-12-2004, 12:44 AM
You can ignore that. I see that all the time. Basically, the config asks for more than the system is allowed. The kernel has a max thread stack request limit. You requested 196608, the kernel allowed 126976. Don't worry about it.
I did what you said, killed the processs, but it didn't help
This is Cpanel Server. phpMyadmin is not working, all mysql driven websites also. mysql_error() is not giving any errors, it is empty. phpMyadmin says wrong username/password
But I can login with any existing username/password in shell
Weird.
Maybe it's a problem with Apache?
Jakiao
08-12-2004, 12:52 AM
So mySQL is running just fine now? Hm ... lets see. Open up the phpMyAdmin config file and check to see if it is connecting to the correct server. There could have easily been a typo made into the config.
mysql is running in shell. It can't connect to it via php. I never changed config files for phpMyAdmin.
Jakiao
08-12-2004, 01:03 AM
Hm ... check the permissions for the users. Maybe it lost the records which would allow online access.
Problem fixed. Apache crashed, works fine after I reinstalled it.
Thanks for help!