Ubuntu setup remote access tutorial for open MySQL Services
- 2020-08-22 22:52:53
- OfStack
Step 1: Modify the configuration file:
vim /etc/mysql/my.cnf
find
bind-address = 127.0.0.1
To:
bind-address = 0.0.0.0
# Allows access to any ip address
You can also specify the IP address.
Restart MySQL:
sudo /etc/init.d/mysqld restart
Step 2: Modify the database configuration:
Authorizes root users to make remote connections
grant all privileges on *.* to root@"%" identified by "password" with grant option;
flush privileges;
Line 2 commands the Settings in effect.