简体   繁体   English

如何在Windows Server 2012 R2上远程连接到MySQL

[英]How to remotely connect to MySQL on Windows Server 2012 R2

I have installed MySQL on a Windows Server 2012 R2 using Microsoft's Web Platform installer. 我使用Microsoft的Web平台安装程序在Windows Server 2012 R2上安装了MySQL。

What I'm having a problem with is how to remotely connect to it? 我遇到的问题是如何远程连接它? I'm able to launch the MySQL command prompt on the server and can see that it is running on port 3306, uses root as the username, the correct password and I can see the hostname (the name of the server). 我能够在服务器上启动MySQL命令提示符,并且可以看到它在端口3306上运行,使用root作为用户名,正确的密码,我可以看到主机名(服务器的名称)。

I have enabled an inbound rule in Windows Firewall for port 3306 but is there anything else I need to do? 我在Windows防火墙中为端口3306启用了入站规则,但还有什么我需要做的吗? I'm trying to connect using MySQL Workbench on my PC but not getting very far. 我正试图在我的电脑上使用MySQL Workbench连接,但没有走得太远。

Thanks, Steven. 谢谢,史蒂文。

Most likely you need to correct your my.ini and either comment the bind-address variable, which is set to 127.0.0.1 by default, or set it to your server's IP address value. 您很可能需要更正my.ini并注释bind-address变量(默认设置为127.0.0.1 ,或将其设置为服务器的IP地址值。

For locations, please refer to: MySQL my.ini location 有关地点,请参阅: MySQL my.ini位置

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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