Keywords: MariaDB - Microsoft Azure - Technical issue - Connectivity (SSH/FTP)
Description:
Hi All,
I have a linux VM running on Azure and it has my wordpress instance running for multiple sites. Now everything was working fine until I rebooted server this morning in order to change IP Address. But After I rebooted All my websites started showing
Error establishing a database connection
So I did troubleshooting and googled for solution, based on different blogs I could find out below.
Check if MySQL is running using
bitnami@SGProdWeb:~$ sudo /etc/init.d/mysql status
* /usr/bin/mysqladmin Ver 9.0 Distrib 5.5.57-MariaDB, for debian-linux-gnu on x86_64
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Server version 5.5.57-MariaDB-1ubuntu0.14.04.1
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/run/mysqld/mysqld.sock
Uptime: 1 hour 1 min 54 sec
Threads: 1 Questions: 81 Slow queries: 0 Opens: 13 Flush tables: 2 Open tables: 39 Queries per second avg: 0.021
But still not able to connect. when I enabled log on my php configuration I got below
Warning: mysqli_real_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) in /opt/bitnami/apache2/*************/wp-includes/wp-db.php on line 1531.
This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at 127.0.0.1. This could mean your host’s database server is down.
Are you sure you have the correct username and password?
Are you sure that you have typed the correct hostname?
Are you sure that the database server is running?
Can anyone please help finding solution its urgent. Thank you in advance.