How to create remote mysql connection on ubuntu
We can enable Mysql Remote connection on ubuntu through 2 simple steps.
Step1:- Change Bind Address
By default mysql is configured to listen only localhost but we have to change Mysql config file to allow Mysql to listen from remote connection. For that we have to edit config file and change bind address from 127.0.0.1 to 0.0.0.0 . we can edit file by typing following command:-
Now we have to restart mysql server and we can do that by typing following commands:-
Step2:- Create Mysql User
Now we are done with 1st step we can create a wild card user to allow remote connection and we can do that by following commands:-
mysql> Create user 'username'@'%' identified by 'password';
mysql> Grant all privileges on *.* to 'username'@'%';
mysql> Flush privileges;
You are all set to connect to mysql through remote connection. The default port for mysql is 3306. So you can connect mysql at http:\\your_ip_address:3306 through wildcard username and password you created.