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"
i can't understand why i can't do it i did ask the same question over and over:
- connect remotly to mysql
- remote connection to mysql (superuser.com)
- remote connection to mysql (dba.stackexchange.com)
- remote connection to mysql
- jit error while connecting to mysql remotly
i also followed this videos step by step and still get the same errors: