You must check the environment variables on the azure app service. You should have variables configured for DATABASE_HOST, DATABASE_NAME, DATABASE_USERNAME, DATABASE_PASSWORD. Are these values there? Did the database name change? Did the credentials change?
Error establishing a database connection. Wordpress on App Service
Hi there
Since morning 22 Feb 2025 our Wordpress on Azure(Azure Marketplace) app site stopped to work showing error "Error establishing a database connection". The was no any problem on Friday even around midnight, when everything worked perfectly.
Nothing has been changed in configuration, credentials are correct, app service was restarted, database server was restarted. Nothing helped.
Wordpress site was restored from automated backup, dated week ago when it worked properly, to newly created app service, but it shows the same error.
Are there any issues with Azure MySql services in North Europe region?
Any idea how to fix an issue and get site worked?
Regards
3 answers
Sort by: Most helpful
-
-
Volodymyr Shatalov - Focal Fact 0 Reputation points
2025-03-11T10:47:57.58+00:00 It looks like an issue was with the database itself. It used 100% CPU all the time. I just restarted the database (it took almost 1 hour to complete) and site started to work again.
-
Shree Hima Bindu Maganti 3,675 Reputation points Microsoft External Staff
2025-03-11T12:09:04.48+00:00 Hi @Volodymyr Shatalov - Focal Fact
I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer.
sol:
It looks like an issue was with the database itself. It used 100% CPU all the time. I just restarted the database (it took almost 1 hour to complete) and site started to work again.
If this answers your query, do clickAccept Answer
andYes
for was this answer helpful. And, if you have any further query do let us know.