Skip to Main Content

General Cloud Infrastructure

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to connect remotely to a MySQL server in a Ubuntu Instance?

Sebastián Águila MontecinoJun 26 2024 — edited Jun 26 2024

I'm running a mysql server in my Ubuntu instance. I'm trying to connect remotely to it with no success.

In ubuntu I downloaded MySQL 5.7, created an user with all permissions granted and allowed to connect from any origin. Then I changed the bind-address to 0.0.0.0 and restarted the mysql server to load the changes. Finally I went to the subnet settings and allowed connection from any origin to the port MySQL is running, but I'm getting connection rejected every time I try to connect.

Checking on the internet seems like I have wrong setting in the oracle panel, but I don't really know to be honest.

Running “ss -tulpen” gives me the following about MySQL:

tcp LISTEN 0 80 0.0.0.0:5001 0.0.0.0:* uid:111 ino:134313 sk:d cgroup:/system.slice/mysql.service <->

Which if I understand well means it's listening to remote connections on the port 5001.

The error I'm getting when I connect to MySQL is: “ERROR 2003 (HY000): Can't connect to MySQL server on 'My IP' (61)”

If anyone knows how to solve this I'd greatly appreciate it.

Comments
Post Details
Added on Jun 26 2024
0 comments
448 views