PDA

View Full Version : Error 2003 - Can't connect (mariadb)


Huppy
02-25-2021, 01:11 PM
Just curious if anybody ran into this before with a remote host (using Debian 10 and Mariadb). Never had a problem like this over the years, but I've included troubleshooting steps already taken. (I'm not new to linux). i've been using Debian since 7.8 was released, never had a problem with it (or sql) until now.

Trying to connect to remote database and getting an error : 2003 - Can't connect to MySQL server on 'x.x.x.x' (10060 "Unknown error") I have all access to the server otherwise and can login to db from there. I just can't get my sql client to connect from home here. The game server itself, runs great.

According to the "hoster", only port they block is 25 by default (on their hardware), but I can enable whatever ports on it I need for server, which i included 3306 and the ports for the server, which work no problem. I also "temporarily" disabled the firewall/IPtables to troubleshoot, it was a no go.

I've done all the basics, with the bind-address, (tried setting it to 0.0.0.0, also tried commenting it out, as well as #skip-networking, etc.) sqld and system have been restarted 100 times.

Also did the granting as well.


GRANT ALL PRIVILEGES ON *.* TO huppy@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;

FLUSH PRIVILEGES;

SHOW GRANTS FOR HUPPY;

+---------------------------------------------------------------------------------------------------------------------------------+
| Grants for huppy@% |
+---------------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO `huppy`@`%` IDENTIFIED BY PASSWORD '*9E3ADB239D30658C352AA0B4D0C27F7CC787CC76' WITH GRANT OPTION |
+---------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.000 sec)


netstat -anp | grep 3306 , I get this:

tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 2913/mysqld


If I comment out the bind-address, I get this:

tcp6 0 0 :::3306 :::* LISTEN 3451/mysqld

Huppy
02-26-2021, 12:06 AM
Problem Solved

Couple of PITA days, but got my connection smoothed out, finally. Turned out to be 2 seperate issues, blocking me. Mariadb default install is configured to keep port 3306 closed, so got that open. Then .... I already had the port open on my modem here at home, but mariadb (or the remote host) uses something else, so i had to lower the wall here and it let me connect to the remote host with my navicat.

I won't know what port on the modem here, it's not setup to show me, just simple preset choices, aside from the forwarding entries I put in. i have to do the same thing when I run the update script. I'm a sucker for punishment, lol

Coffee break .......