mysql - Xampp Linux: PDOException: SQLSTATE[HY000] [2002] Connection refused in lock_may_be_available() error -



mysql - Xampp Linux: PDOException: SQLSTATE[HY000] [2002] Connection refused in lock_may_be_available() error -

i have been struggling find solution issue mysql. things changed after placed ojdbc jar file on apache solr tomcat server. since have been getting error. seems there yet mysql instance running on machine. xampp status shows mysql database deactivated. have been searching working solution since morning no luck. help much appreciated.

ps: /opt/lampp/lampp status says mysql 'running'. when stopped, reads 'ok' when starting again, says 'already running'....and xampp status page says mysql database deactivated

the command /opt/lampp/lampp status goes , check pid file mysql_pidfile=/opt/lampp/var/mysql/$hostname.pid

sometimes pid file corrupted (in case of crash, or procees kill).

in such scenario, status command tell mysql running, there no process exists pid file , xampp status shows in browser not able connect server (because not running) , hence come deactivated.

just rename pid file $hostname_bkp.pid or , restart lampp, issue resolved.

mysql linux connection

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

c# - Create a Notification Object (Email or Page) At Run Time -- Dependency Injection or Factory -

ruby on rails - Devise Logout Error in RoR -