MySQL Forums
Forum List  »  Newbie

remote connection to a mysql db fail
Posted by: migo max
Date: April 07, 2014 07:36AM

I wan't to establish a remote connection from PC#2 to a database in PC#1.

PC1:

setup mysql server and workbench.
Set password to the root user, UPDATE mysql.user SET Password = Password('123') WHERE user = 'root';
GRANT ALL PRIVILEGES ON . TO 'root'@'%' IDENTIFIED BY '123';
Create database CREATE DATABASE my_test;
CREATE TABLE info (id int(11), name nvarchar(50));
from ipconfig in cmd get my_ip
Edit my.ini add # bind-address= "my_ip"
from firewall inbound role open 3306.
PC2:

setup mysql server and workbench.
Connect to that my_test: workbench: hostname = my_ip, password = 123, Username = root cmd: mysql -u root -h my_ip -p 123 connection string: Server=my_ip;Port=3306;Database=my_test;UID=root;PWD=123;
and it gives me a jit error :

MySql.Data.MySqlClient.MySqlException (0x80004005): Unable to connect to any of the specified MySQL hosts.

also from cmd in PC#2 :

mysql -u root -h MyIp -p

Error 2003 Can't connect to Mysql server on "myIp"

Options: ReplyQuote


Subject
Written By
Posted
remote connection to a mysql db fail
April 07, 2014 07:36AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.