0

MySQL was installed on Ubuntu 22.04 server per instructions on 192.168.8.112:

https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-22-04

  • I am able to SSH into the server and then login into mySQL as root.

The goal is to connect MySQL (MacOS) to MySQL: both server and Mac are on the same LAN.

enter image description here

"Test Connection" returns:

enter image description here

QUESTION

How to diagnose the reason(s) for the error message?

Is workbench configured to not use SSH by using port 3306? Why is it trying SSH port 22? Is there a list of diagnostics that can be performed, so as to ensure that the workbench connects?

asked Dec 27, 2023 at 23:15

1 Answer 1

0

Reference: https://tecadmin.net/mysql-allow-remote-connections/#

KEY FACT: By default, MySQL is configured to listen on the localhost (127.0.0.1), which means that (initially) it can only be accessed from the same machine it is installed on. For remote access (MySQL workbench) MySQL must be configured to on other interfaces.

To configure 22.04 to listen from other interfaces: configure MySQL to bind to all interfaces (listen to 0.0.0.0). In Ubuntu:

sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf

set: bind-address = 0.0.0.0

reboot mysql service:

systemctl restart mysql.service #restart

Verify with netstat:

sudo netstat -tulpn | grep -e "192.168.8.112" -e "mysql"

enter image description here

answered Dec 28, 2023 at 14:46

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.