1

I'm running CentOS v7.9 with MariaDB v5.5.68. I'm trying to access the MariaDB databases from a Win10 machine using Visual Studio Code with SQLTools & MySQL/MariaDB extensions.

I have configured MariaDB for remote access per this link: Configuring MariaDB for Remote Client Access

[mysqld]
skip-networking=0
skip-bind-address

I created the users and added the privileges - tested by logging in locally with 'bob' and viewing permissions in mysql.user. (BTW, in case not readily apparent, the UID, host, and PWD aren't real.)

CREATE USER 'bob'@'1.2.3.%' IDENTIFIED BY 'myPWD';
GRANT ALL PRIVILEGES ON *.* TO 'bob'@'1.2.3.%' IDENTIFIED BY 'myPWD';

However, when I try to log in remotely (from another Linux box) using mysql -u userID -h hostIP -p, I get the error:

ERROR 2003 (HY000):  Can't connect to MySQL server on '1.2.3.4' (110)

When I try to make the database connection using VS Code, SQLTools tells me I've connected, but it won't show any tables, I'm not able to make any queries, and I get this error: Request connection/GetChildrenForTreeItemRequest failed with message: Handshake inactivity timeout.

I have reviewed this SO page and others, but still can't get the connection to work.

UPDATED for clarity - provides mysql.user and netstat info:

MariaDB [(none)]> select user, host from mysql.user;
+------+-------------+
| user | host        |
+------+-------------+
| bob  | 10.0.2.15   |      # Can't connect
| rob  | 127.0.0.1   |      # Logs in locally via command line
| root | 127.0.0.1   |      # Logs in locally via command line
| bob  | 192.168.0.% |      # Can't connect
| root | 192.168.0.% |      # Can't connect
| root | ::1         |      # Logs in locally via command line
| rob  | localhost   |      # Logs in locally via command line
| root | localhost   |      # Logs in locally via command line
+------+-------------+
8 rows in set (0.00 sec)


$ > netstat -tulpen
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode      PID/Program name    
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      27         33813      -                   

Any help is much appreciated as I've been working this problem for 2+ days and have not made any headway.

dave
  • 147
  • 1
  • 1
  • 12
  • This post may be helpful: [Access mysql remote database from command line](https://stackoverflow.com/questions/15872543/access-mysql-remote-database-from-command-line) – Tu deschizi eu inchid Nov 24 '20 at 22:58
  • I added additional information from mysql.user and netstat. For @user9938 - Yes, I've seen this page, as indicated above. – dave Nov 25 '20 at 14:56

0 Answers0