Resolving Bitnami MySQL Connectivity Issues

Keywords: MySQL - Other - How to - Secure Connections (SSL/HTTPS)
Description:
I have setup Bitnami MySQL service on Azure. The VM is up and I am able to connect to the VM through ssh like ssh username@HOSTNAME:

I am able to login to the mysql from the prompt like

mysql -uroot -pSOMEPASS >

Meanwhile I am able to connect this mysql service from a remote host: mysql -uroot -pPASS -hxxx.xxx.xx.xx

The following error is what I received

ERROr 2003 (HY000); Can't connect to MySQL Server on xxx.xxx.xx.xx

I tried commenting out the the bind-address in the /opt/bitnami/mysql/my.cnf

and tried giving the value for bind-address as 0:0:0:0 & also removing the variable.

To ensure the mysql port is up or not I gave the following comamnd

netstat -tln

tcp6 0 0 :::3306 :::* LISTEN

the above results mean port is and listening

In terms of file permission related, I entered the following ones

chmod 777 /opt/bitnami/mysql/tmp
chmod 755 /opt/bitnami/mysql/data
chown -R root:root /opt/bitnami/mysq/tmp
chown mysql:root /opt/bitnami/mysql/data/
sudo chmod 777 /opt/bitnami/mysql/tmp
sudo chmod 755 /opt/bitnami/mysql/data
sudo chown root:root /opt/bitnami/mysql/tmp
sudo chown mysql:root /opt/bitnami/mysql/data

Also added skip-grant-tables in my.cnf

I also performed the following the query in the mysql

GRANT ALL ON . to root@'%' IDENTIFIED BY 'SOMEPASSWORD';

Any hint would be greatly appreciated.

Thanks in advance

Hi @iraleksandrova1992

I think you may find helpful this post.

Let me know if you find any issue.


Was my answer helpful? Click on :heart:

1 Like

Thanks so much, your suggestion worked for me.