We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
Error establishing a database connection
Error establishing a database connection
Hi everyone,
I get the following error with MySQL; I restarted MySQL server many times it solved the issue for some time, but it keeps coming again:
Magento site: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
Wordpress site: Error establishing a database connection
Please help
I get the following error with MySQL; I restarted MySQL server many times it solved the issue for some time, but it keeps coming again:
Magento site: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
Wordpress site: Error establishing a database connection
Please help
Re: Error establishing a database connection
It look like MySQL server runs out of memory and dies. If you can not increase memory on a server, you can try to decrease memory consumption by tuning my.cnf file. Depending on your operating system config file is located in /etc/mysql/my.cnf or /etc/my.cnf
I suggest to start with decreasing following parameters:
max_connections
max_user_connections
I suggest to start with decreasing following parameters:
max_connections
max_user_connections
Re: Error establishing a database connection
Thank you Skid. How about using a swap file? any advantage over "decrease memory consumption by tuning my.cnf file"
Re: Error establishing a database connection
Well, it's up to you to decide. Sometimes swap can improve overall health.