I'm trying to set up a MySQL server on Windows that will allow another computer to connect to it remotely. The client computer is getting a 'Can't connect to MySQL server' error in MySQL Workbench.
Both computers are on the same network, and the server is using a static IP address (I have forwarded ports in my router to allow external connections to the public IP address).
What I've tried (suggested by other threads):
- In my.ini, setting
bind-address = 0.0.0.0
/ commenting outbind-address
/ commenting outskip-networking
- Running
GRANT ALL PRIVILEGES ON *.* TO 'USERNAME'@'IP' IDENTIFIED BY 'PASSWORD';
. When I run this, I get the errorUsing GRANT statement to modify existing user's properties other than privileges is deprecated and will be removed in a future release
; however I can confirm that in Workbench, the user's privileges are all checked (under the 'Users and Privileges' screen). - In my router settings, forwarded port 3306 on the server's static IP address
- Disabling the Windows Firewall on the server.
- Verified that the MySQL Server Windows Service is running.
Can anyone advise?
Ref: Try connecting with mysql cli instead of work bench from the remote machine, so u can isolate that cli client u r able to access the remote DB. because the following reason might be causing connectivity issue in Workbench.
mysql cli cmd install mysql.exe client program from cmd prompt> mysql -hhostname -uusername -ppass dbname
Cannot connect to Database server (mysql workbench)
In MySQL Workbench (5.2.47 CE)
click Mange Server Instances (bottom right corner)
click Connection
in the Connection box select:
Local Instance ($ServerName) - [email protected]:3306 '<'Standard(TCP/IP)>
click Edit Selected...
under Parameters, Hostname change localhost or 127.0.0.1 to your NetBIOS name
click Test Connection