Remote Connect MySQL Server from Client Machine Setup
You can only connect to MySQL Server from localhost after MySQL installation by default, but in production, all MySQL clients remotely connect to server, for simulating real production environment in your home network, some configurations need to be made to be able to let you connect MySQL from client machine other than localhost.
Revise or create MySQL configuration file (RHEL or Centos 7)
Modify or create /etc/my.cnf file
1
vim /etc/my.cnf
add a configuration item bind-address and let it value to be your MySQL server host ip address (eg. 192.168.1.114)
1
bind-address=192.168.1.114
[
save and exit
1
:wq
Restart MySQL service
1
systemctl restart mysql.service
Open TCP port 3306 using iptables
Setup /sbin/iptables and let firewall opens port on 3306 for any remote machine