How to allow remote connection to mysql [Music no 11]

In the previous blog post, I show how to create MySQL database on linux server. I was able to access that MySQL, create db, create users and so on. The music application which is no the server is able to use this db. BUT! Nobody can access that database from outside. I am not able to connect from my localhost to my database on Linux server. How I can handle that?

So my application on server has a pretty straightforad connection string:

But the very same connection won’t work on my localhost. So what I have to do? First I go /etc/mysql/mysql.conf.d/mysqld.cnf and edit line with:

And just commend this out:

Bind – address means who which ip address can access mysql. By commeting this out we made our MySql database avaliable for everyone.

In previose blog post we created users.

Now we need to allow then to work also from every single place in the world :). We allow accessing our db by a specific user from any IP address.

At the moment to access database from localhost I can use connecition string


Powered by: Wordpress