connecting mysql by php
After spending many hours on configuring Apache+Mysql+php
I still encounter probs.
I've installed using Mysql RPMs and done a static install for Apache and php and it works (RH 7.3)
here the only problem
When I'm trying to connect mysql database using php, it says something like :
Waring : could not connect to local mysql server through /tmp/mysql.sock
so I've edit the my.cnf and put
socket=/tmp/mysql.sock
When I'm launching the daemon using
safe_mysql&
and then trying to connect using
mysql -u root -pxxxxxx
it says that he can't connect to /var/lib/mysql/mysql.sock ??!!
and I can't user mysqladmin -u root -pxx shutdown to close it and I can't shut it using kill -9 !!!
so I'm restarting everytime....
Thanks for helping
|