Reputation: 2470
Every time when I'm trying to connect remote mysql server through workbench. It gives me an error
can't connect mysql on remote server '10061'
But I am able to connect with phpmyadmin.
Upvotes: 0
Views: 5932
Reputation: 665
Add following lines to my.cnf in mysqld section
bind-address = 0.0.0.0
Restart mysql service
Fire following query(on machine to which you want to connect)
i. create new user and password and grand privileges to that IP
GRANT ALL ON database_name.* TO u_name@'202.54.10.20' IDENTIFIED BY 'PASSWORD';
ii. To overwrite privilege
FLUSH PRIVILEGES
Upvotes: 0
Reputation: 2470
MySQL on default only listens to localhost as a security precaution. You might need to make sure MySQL is listening on your external IP interface: Follow the steps:
nano /etc/mysql/my.cnf
Edit the MySQL configuration file on your server and go to the following line:
bind-address = 127.0.0.1
The IP address 127.0.0.1 means your MySQL is only listening localhost. Change it to
bind-address = 0.0.0.0
Now MySQL will listen all IP Address.
Upvotes: 1