简体   繁体   中英

mysql windows remote access

I've installed MySql on my Win2k3x86 vm box and am trying to connect to it using SequelPro on my Mac so I can run a large sql statement (~30mb - SQL Workbench locks up loading it). MySql was installed with all the developer default options and opened port 3306 (it said) in the servers firewall (which isn't running anyway).

After installing MySql (and consulting google), I loaded MySQL Workbench and ran the following sql:

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;

this ran happily. But SequelPro can't connect to it, and throws its usual "permission denied" type error: this doesn't identify if it can connect or not, just that authentication didn't happen.

I telnetted to the box's ip and port, and this happened:

TimsMacBookAir:~ tim$ telnet 192.168.2.107 3306
Trying 192.168.2.107...
Connected to 192.168.2.107.
Escape character is '^]'.
J
5.6.16!pR+}Vscv!?HBQR*v9T~<OWmysql_native_passwordConnection closed by foreign host.
TimsMacBookAir:~ tim$ 

A timeout, but what is with all the guff on the line? If I manage to type in my password before the timeout, then I get this:

!#08S01Got packets out of orderConnection closed by foreign host.

More nonsense, and a packets out of order - so some sort of network problem? (This is running Win2k3 32Bit SP2 on VirtualBox 4.3.2, Bridged networking with fixed IP, bridged to my Mac's thunderbolt ethernet adaptor). Other services (like IIS on port 80, node.js on 8080) work just fine.

I should have googled more...

https://serverfault.com/a/486716/163473 - has the answer.

create user 'root'@'192.168.1.123' identified by '(redacted)';
grant all privileges on *.* to 'root'@'192.168.1.123' with grant option;
flush privileges;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM