0

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

PC1:

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

PC2:

  1. setup mysql server and workbench.
  2. 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"

i can't understand why i can't do it i did ask the same question over and over:

i also followed this videos step by step and still get the same errors:

Community
  • 1
  • 1
Maged E William
  • 436
  • 2
  • 9
  • 27

0 Answers0