Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
Remote Connection to MariaDB on Ubuntu
I have set up maraDB and have been trying to connect to it remotely with no luck. I have read through a bunch of posts and have tried the following:
I have looked in my.cnf to change the bind-address to 0.0.0.0.0 but have not found it defined anywhere
Configured ufw to open port 3306
# ufw status Status: active To Action From -- ------ ---- 22 ALLOW Anywhere 3306/tcp ALLOW Anywhere 3306 ALLOW Anywhere 22 (v6) ALLOW Anywhere (v6) 3306/tcp (v6) ALLOW Anywhere (v6) 3306 (v6) ALLOW Anywhere (v6)
It hasn’t worked so far.
Using a suggestion from a post, it looks like mysql is only listening locally on port 3306.
# sudo lsof -iTCP -sTCP:LISTEN -P COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME sshd 1540 root 3u IPv4 15872 0t0 TCP *:22 (LISTEN) sshd 1540 root 4u IPv6 15881 0t0 TCP *:22 (LISTEN) mysqld 3771 mysql 16u IPv4 20248 0t0 TCP localhost:3306 (LISTEN)
Is there anyway to change this? Thanks for any help.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×