K
K
KoMPoTuK2013-12-22 23:03:11
MySQL
KoMPoTuK, 2013-12-22 23:03:11

Why is it impossible to open access to MySQL from an external network?

My actions:
1. Installed MySQL Server from the official site
2. Connected the Internet directly to the computer
3. Opened incoming ports (ranges) 80-81, 5000-5010, 443, 3306 in the Windows firewall
4. Installed [mysqld] bind in the settings -address 0.0.0.0
5. Restarted the server
6. Using the MySQL console, set the root user to Host = %
7. Turned off Kaspersky (antivirus)
8. Tried to connect to the external IP of my server
9. The connection was not established
Please help me determine what I did wrong or what needs to be done to achieve the goal.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
alexk24, 2013-12-23
@KoMPoTuK

OS on which MySql is installed as I understand Windows?
1. Command netstat -na | find "3306" check that mysql is really listening on port 3306.
if the port is not listening or listening on the wrong addresses, dig the configuration for the skip-networking, bind-address, etc. parameters.
2. Using the telnet localhost 3306 command from the local machine, check that you can connect to it from the local machine.
3. Using the telnet 3306 command from a remote machine, check that you can connect to it from a remote machine - if it doesn't work, look at the firewall settings.
4. If it was possible to connect in step 3 - see the user settings - they probably made a mistake somewhere when they allowed the root to connect from any host.

V
Vlad Zhivotnev, 2013-12-23
@inkvizitor68sl

ip-address then you have "white"?
Look in the properties of the network card (or vpn connection, if it exists) - the address must match the one you see on ifconfig.me
If not, then without improvised means (mainly related to tunneling traffic from another machine, which has a white address on yours) will not work.
bind-address in :: set try again.

N
Nikolai Vasilchuk, 2013-12-23
@Anonym

MySQL feels it is unsafe to keep it open outside and resists. Humble yourself.

Y
Yuri Yarosh, 2013-12-23
@d00mko

Check for the presence of the skip-networking line in my.cnf.
If there is, just comment it out or delete it.
You can check if the port is open at all
Run netstat -tabon as admin

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question