Can't connect to mySQL

My ERPNext installation has two servers. Bench is installed on the first server and the second has the MariaDB installed.

ERPNext works fine and after a few days of ERPNext running continuously, I start to see that I cannot use ERPNext and see the below error in the error snapshot.

OperationalError(2003, "Can't connect to MySQL s...n '10.150.0.2' ([Errno 111] Connection refused)")

I When I see this error, I restart the MariaDB server and everything works fine after that. Any clues to resolve this issue?

Use this command

mysql -u root -p -A

OR

bench --site <your site_name> mariadb
1 Like