DBeaver / MySQL Workbence - unable to connect to remote MySQL

From Windows 10 Pro / Leap 15.4 using both MySQL Workbence / DBeaver CE I’m unable to connection to my Leap 15.4 used as a mysql server, will have multiple VM Web Servers connection to it. DBeaver is able to show log trying to connection, but I get these log messages:

Leap:

8/30/22 8:17 PM    sshd    Accepted password for nasheayahu from 10.60.70.10 port 58693 ssh2
8/30/22 8:17 PM    systemd-logind    New session 13 of user nasheayahu.
8/30/22 8:17 PM    systemd    Started Session 13 of User nasheayahu.
8/30/22 8:17 PM    sshd    pam_unix(sshd:session): session opened for user nasheayahu by (uid=0)
8/30/22 8:17 PM    sshd    error: connect_to mysqldbdev port 3306: failed.
8/30/22 8:17 PM    sshd    pam_unix(sshd:session): session closed for user nasheayahu
8/30/22 8:17 PM    systemd    session-13.scope: Deactivated successfully.
8/30/22 8:17 PM    systemd-logind    Session 13 logged out. Waiting for processes to exit.
8/30/22 8:17 PM    systemd-logind    Removed session 13.

DBeaver:


Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.

Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
  Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
  Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.

I tried using two different mysql users admindb and dbadmin:


+-------------+-----------+-------------------------------------------+
| User        | Host      | authentication_string                     |
+-------------+-----------+-------------------------------------------+
| mariadb.sys | localhost |                                           |
| root        | localhost | invalid                                   |
| mysql       | localhost | invalid                                   |
| **admindb**     | localhost | *407103FB801B827BC263E3F2CB4E4133A33353AE |
| **dbadmin**     | %         | *407103FB801B827BC263E3F2CB4E4133A33353AE |
+-------------+-----------+-------------------------------------------+

with no success. Want to make changes to the mysql.cnf, but its not located in /etc/my.cnf.d to perhaps change the binding address to 0.0.0.0, so 1) where is it located and, 2) what other changes I need to do to get this working?

Is your mysql server configured to listen to the external network (no bind-address = 127.0.0.1)?

Are there any firewalls involved (e.g. firewalld on your openSUSE Leap 15.4 machine which hosts the mysql server)?

Are all firewalls configured to allow network traffic for mysql?

Your user admindb will not be able to do remote logins because it is configured to login via localhost only.


+-------------+-----------+-------------------------------------------+
| User        | Host      | authentication_string                     |
+-------------+-----------+-------------------------------------------+
...
| admindb     | localhost | *407103FB801B827BC263E3F2CB4E4133A33353AE |
...
+-------------+-----------+-------------------------------------------+

Your user dbadmin should be able to do remote and local (%) logins.


+-------------+-----------+-------------------------------------------+
| User        | Host      | authentication_string                     |
+-------------+-----------+-------------------------------------------+
...
| dbadmin     | %         | *407103FB801B827BC263E3F2CB4E4133A33353AE |
+-------------+-----------+-------------------------------------------+

Regards

susejunky

where is the mysql server .conf file located?, 2nd) I get this on the mysql server:


State                      Recv-Q                      Send-Q                                                Local Address:Port                                            Peer Address:Port                     Process
LISTEN                     0                           80                                                        127.0.0.1:3306                                                 0.0.0.0:*
...
..
.

which I’m assuming this will not allow any outside connections correct?

I also tested with almalinux and was successful to connect with this:


State                       Recv-Q                      Send-Q                                           Local Address:Port                                              Peer Address:Port                      Process
...
..
.
LISTEN                      0                           151                                                          *:3306                                                         *:*
.

Yes, I have the public mysql port is set.

On my system the mysql config file is /etc/my.cnf .

However I use openSUSE Tumbleweed (but I guess it is the same with openSUSE Leap 15.4).

I have no idea how you produced this output so I can’t comment on it.

Please keep in mind that people reading your posts cannot look over your shoulder and see what you do on your system (nor can they read your mind). The only information they get is what you provide in your post.

So please always give a complete record of what you did: Show the command as you supplied it, the complete output produced by the command and the next empty prompt e.g.

> uname -a
Linux SYSTEM_01 5.19.2-1-default #1 SMP PREEMPT_DYNAMIC Thu Aug 18 05:06:49 UTC 2022 (6c252ef) x86_64 x86_64 x86_64 GNU/Linux
>

Comprehensive texts (or images) can be uploaded to https://paste.opensuse.org and the link shown here. Keep in mind: Not everybody trusts external sites that want to run scripts. So only use https://paste.opensuse.org.

Regards

susejunky