S
S
Sanek15122020-09-14 16:13:36
MySQL
Sanek1512, 2020-09-14 16:13:36

I can't connect to MySql remotely. What could be the problem?

As a local server - a separate home computer with Ubuntu 20.04 OS.
The server was given a static IP: 192.168.0.123.
I installed MySql on the server and made the following settings:

In the files:
/etc/mysql/my.cnf
/etc/mysql/mysql.conf.d/mysql.cnf

- added the lines:


[client]
port = 3306

[mysqld]
bind-address = 0.0.0.0
port =

3306 .conf.d/)

Restarted MySQL.

Firewall disabled in Windows'e, Ubuntu-server, router.

What we have in the end:
Connecting to the server via ssh is working.

~$ nmap -p 3306 localhost- the port is open , but it
~$ nmap -p 3306 192.168.0.123is closed .

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Ruslan Fedoseev, 2020-09-14
@martin74ua

netstat -atunp | grep mysql
iptables -L -n
please show

A
Andrey Barbolin, 2020-09-15
@dronmaxman

Does the sql account from which you connect has permissions to connect remotely?)
In order not to fool around with this (and not open a hole), I usually use SQL clients that can connect over SSH.
For example DataGrip

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question