easyengine icon indicating copy to clipboard operation
easyengine copied to clipboard

MariaDB 111 “Connection refused”

Open vikas5914 opened this issue 10 years ago • 6 comments

i was login Error establishing a database connection in my wordpress site . so i login into ssh and try to login in mariadb with username and password from wp-config.php

It gave me Connection refused error . i restart mariadb and used same login and i was able to login it .

this happen 3 time in this week . how to fix it .

PS : SSH LOG

root@reapershop:~# mysql -ureapershop_com -p Enter password: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111 "Connection refused") root@reapershop:~# service mysql restart

  • Stopping MariaDB database server mysqld [ OK ]
  • Starting MariaDB database server mysqld [ OK ]
  • Checking for corrupt, not cleanly closed and upgrade needing tables. root@reapershop:~# mysql -ureapershop_com -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 44 Server version: 10.1.8-MariaDB-1~trusty-log mariadb.org binary distribution

vikas5914 avatar Dec 29 '15 15:12 vikas5914

Yea, I'm experiencing this site creation bug yet again, myself. It would definitely be nice if it could be permanently squashed. I'm also getting database connection issues on several sites, some of which are barely used and get little traffic. It seems MariaDB is a real pain point in EasyEngine right now.

ldashdixon avatar Jan 07 '16 23:01 ldashdixon

Same behaviour here: Error establishing a database connection I found that restarting MariaDB or the full stack with: ee stack restart But doing this every day is a pain...

Any thoughts?

bobwol avatar Feb 26 '16 20:02 bobwol

I use cronjobs to keep things working.

* * * * * service mysql status || service mysql start
* * * * * service hhvm status || service hhvm start

Every minute the server will check itself if MySQL (and HHVM) are up and running; case not, the services are automatically restarted.

Not elegant, but it works.

janiosarmento avatar Feb 27 '16 01:02 janiosarmento

There also Monit to automate things like this

w33zy avatar Feb 27 '16 03:02 w33zy

Thanks @janiosarmento and @w33zy I'll try one of these.

bobwol avatar Feb 29 '16 16:02 bobwol

Sorry for a delayed reply. I hope your issue is fixed by now.

If you are still facing the issue, please use http://community.rtcamp.com/c/easyengine for further support.

We are cleaning up issue tracker and closing this issue because we won't be able to contribute to this discussion further.

rahul286 avatar May 29 '18 12:05 rahul286