I have done mysql installation with sudo apt-get install mysql-server
. By ssh yes I can enter but by navicat it won't let me.
Can someone help me with Mysql configuration? because I do everything I think is necessary, but through ssh I do connect but not through navicat (for example).
To configure external access to your MySQL server you must follow these steps:
localhost
,127.0.0.1
).root
Create the remote user and give it privileges.Below I will detail each of the steps.
Make MySQL server listen for external connections
You have to edit the file
my.cnf
to changebind-address
to0.0.0.0
.In this particular case the file was located in
/etc/mysql/mysql.conf.d/mysqld.cnf
.Enable access to the MySQL server in the firewall
Since it was being used as a firewall
ufw
, you have to enable access to port 3306 used by the MySQL server by typing:Create the remote user
root
and give it privilegesTo create a
root
remote user the following SQL queries must be used:If the user
'root'@'%'
already exists, but the password is unknown, it can be changed using: