问题
I have MySQL installed on a Windows 2003 server on our domain. I cannot connect to it from other machines on the domain. I open up the MySQL Administrator panel and try to change the server name from localhost to the machine name it does not recognize it. I have tried fully qualifying the name also. Any ideas what I need to change?
回答1:
What sort of error, a total inability to connect? Windows Firewall is the first place I'd look, to make sure port 3306 is open.
回答2:
have you double checked permissions on the databases using something like
grant all priviliges on 'database'.'*' to 'username'@'remote_machine_ip' identified by 'password';
Like Sukasa mentioned, also double check any firewalls you may have configured
回答3:
You need to look in the my.cnf file and look for the bind-address
setting and the skip-networking
setting. You want the latter removed or commented out and the former to be the machine's IP address. Restart MySQL after you make changes.
A number of MySQL install packages defaulted to a local socket only install, which is helpful for security but considerably impairs network connectivity. :-)
回答4:
I was trying to connect to the database using the default root userid. I created a new user and gave this user read permission to the needed tables.
来源:https://stackoverflow.com/questions/804772/connecting-to-mysql-from-other-machines