L
L
Les Alterman2016-11-05 17:38:35
MySQL
Les Alterman, 2016-11-05 17:38:35

Why can't I connect to Mysql on port 3306?

I'm trying to connect to mysql, which is on a virtual machine, through port 3306. The server is Nginx. In mysql config bind-ardess = 0.0.0.0 but still won't connect. What is the problem?
=== UPDATE ===
Nginx running on port 80
In Mysql config:
[client]

port = 3306
socket = /var/run/mysqld/mysqld.sock

[mysqld]
bind-address = 0.0.0.0
port = 3306

command netstat -nap | grep mysql gives the following:
6:tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      1504/mysqld     
36:unix  2      [ ACC ]     STREAM     LISTENING     12054    1504/mysqld         /var/run/mysqld/mysqld.sock

===UPDATE===
The telnet localhost 3306 command issues
Trying ::1...
Connected to localhost.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Max, 2016-11-05
@Les_Alterman

use mysql;
update user set host=’%’ where user=’root’;
flush privileges;
exit

Don't do this on combat servers.

S
SKRSKR, 2016-11-05
@SKRSKR

You need to give mysql permission to connect, use phpmyadmin for this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question