Reputation: 94
Today i installed Oracle Linux 9.5 into Hyper-v (ip is 192.168.0.131). and installed MySQL 8.4.3 at the same time.
After installed MySQL, using mysql -u root -h 127.0.0.1 -p
can login by terminal .
After logon, using update user set host='%' where user='root'
to enable root remote login. quit MySQL, and relogin by mysql -u root -h 192.168.0.131 -p
, success.
Modify firewall rule using firewall-cmd --zone=public --add-port=3306/tcp --permanent
, firewall-cmd --reload
, and using firewall-cmd --list-ports
can see 3306 is listed.
But, when i using navicat to test connection to 192.168.0.131 from PC 192.168.0.122, i got an error
Test Failed 2002 - can't connect to server on '192.168.0.131'(10060)
Ping from 192.168.0.122 to 192.168.0.131 is ok. if i stop firewall by systemctl stop firewalld
, nvaicat connection test success.
What's the problem? and how to fix it.
Upvotes: 1
Views: 31