MySQL Remote connection not succeeding
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I'm trying to connect to a MySQL db remotely for about 10 hours with no luck.
The server is running Debian.
The my.cnf
is configured correctly with bind-ip 0.0.0.0
and no skip-networking.
lsof -i :3306
shows an established connection from the connecting IP to the server, but then dies off.
When using tcpdump port 3306 and '(tcp-syn|tcp-ack)!=0' on server I get this when trying to connect to it:
10:55:44.195273 IP server2.xxx.xxx.mysql > xxx.xxx.12.89.53920: Flags [R], seq 1740903883, win 0, length 0
The user connecting is granted all access from %
.
I don't know what more to do. The server is running ISPConfig
with bastille
firewall but even with it off nothing works. I am able to connect to the db locally and LAN addresses.
This is what I get when I'm trying to connect to the db server:
"ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 2 "No such file or directory"
my.cnf
skip_name_resolve is on
bind address commented
Any clues?
debian mysql remote
 |Â
show 5 more comments
up vote
0
down vote
favorite
I'm trying to connect to a MySQL db remotely for about 10 hours with no luck.
The server is running Debian.
The my.cnf
is configured correctly with bind-ip 0.0.0.0
and no skip-networking.
lsof -i :3306
shows an established connection from the connecting IP to the server, but then dies off.
When using tcpdump port 3306 and '(tcp-syn|tcp-ack)!=0' on server I get this when trying to connect to it:
10:55:44.195273 IP server2.xxx.xxx.mysql > xxx.xxx.12.89.53920: Flags [R], seq 1740903883, win 0, length 0
The user connecting is granted all access from %
.
I don't know what more to do. The server is running ISPConfig
with bastille
firewall but even with it off nothing works. I am able to connect to the db locally and LAN addresses.
This is what I get when I'm trying to connect to the db server:
"ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 2 "No such file or directory"
my.cnf
skip_name_resolve is on
bind address commented
Any clues?
debian mysql remote
1
From a remote host, are you able tonc -z -w 2 dbhost.example.com 3306
successfully?
â DopeGhoti
Oct 2 '17 at 18:41
The command executes without any return with the correct address.
â Andreas Winkler
Oct 2 '17 at 19:03
With what exit code?
â DopeGhoti
Oct 2 '17 at 19:04
No exit code at all
â Andreas Winkler
Oct 2 '17 at 19:24
2
Not possible. All programs return an exit code upon exit. Re-run the command, and follow it up withecho $?
.
â DopeGhoti
Oct 2 '17 at 21:15
 |Â
show 5 more comments
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm trying to connect to a MySQL db remotely for about 10 hours with no luck.
The server is running Debian.
The my.cnf
is configured correctly with bind-ip 0.0.0.0
and no skip-networking.
lsof -i :3306
shows an established connection from the connecting IP to the server, but then dies off.
When using tcpdump port 3306 and '(tcp-syn|tcp-ack)!=0' on server I get this when trying to connect to it:
10:55:44.195273 IP server2.xxx.xxx.mysql > xxx.xxx.12.89.53920: Flags [R], seq 1740903883, win 0, length 0
The user connecting is granted all access from %
.
I don't know what more to do. The server is running ISPConfig
with bastille
firewall but even with it off nothing works. I am able to connect to the db locally and LAN addresses.
This is what I get when I'm trying to connect to the db server:
"ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 2 "No such file or directory"
my.cnf
skip_name_resolve is on
bind address commented
Any clues?
debian mysql remote
I'm trying to connect to a MySQL db remotely for about 10 hours with no luck.
The server is running Debian.
The my.cnf
is configured correctly with bind-ip 0.0.0.0
and no skip-networking.
lsof -i :3306
shows an established connection from the connecting IP to the server, but then dies off.
When using tcpdump port 3306 and '(tcp-syn|tcp-ack)!=0' on server I get this when trying to connect to it:
10:55:44.195273 IP server2.xxx.xxx.mysql > xxx.xxx.12.89.53920: Flags [R], seq 1740903883, win 0, length 0
The user connecting is granted all access from %
.
I don't know what more to do. The server is running ISPConfig
with bastille
firewall but even with it off nothing works. I am able to connect to the db locally and LAN addresses.
This is what I get when I'm trying to connect to the db server:
"ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 2 "No such file or directory"
my.cnf
skip_name_resolve is on
bind address commented
Any clues?
debian mysql remote
debian mysql remote
edited Oct 3 '17 at 13:19
asked Oct 2 '17 at 18:20
Andreas Winkler
13
13
1
From a remote host, are you able tonc -z -w 2 dbhost.example.com 3306
successfully?
â DopeGhoti
Oct 2 '17 at 18:41
The command executes without any return with the correct address.
â Andreas Winkler
Oct 2 '17 at 19:03
With what exit code?
â DopeGhoti
Oct 2 '17 at 19:04
No exit code at all
â Andreas Winkler
Oct 2 '17 at 19:24
2
Not possible. All programs return an exit code upon exit. Re-run the command, and follow it up withecho $?
.
â DopeGhoti
Oct 2 '17 at 21:15
 |Â
show 5 more comments
1
From a remote host, are you able tonc -z -w 2 dbhost.example.com 3306
successfully?
â DopeGhoti
Oct 2 '17 at 18:41
The command executes without any return with the correct address.
â Andreas Winkler
Oct 2 '17 at 19:03
With what exit code?
â DopeGhoti
Oct 2 '17 at 19:04
No exit code at all
â Andreas Winkler
Oct 2 '17 at 19:24
2
Not possible. All programs return an exit code upon exit. Re-run the command, and follow it up withecho $?
.
â DopeGhoti
Oct 2 '17 at 21:15
1
1
From a remote host, are you able to
nc -z -w 2 dbhost.example.com 3306
successfully?â DopeGhoti
Oct 2 '17 at 18:41
From a remote host, are you able to
nc -z -w 2 dbhost.example.com 3306
successfully?â DopeGhoti
Oct 2 '17 at 18:41
The command executes without any return with the correct address.
â Andreas Winkler
Oct 2 '17 at 19:03
The command executes without any return with the correct address.
â Andreas Winkler
Oct 2 '17 at 19:03
With what exit code?
â DopeGhoti
Oct 2 '17 at 19:04
With what exit code?
â DopeGhoti
Oct 2 '17 at 19:04
No exit code at all
â Andreas Winkler
Oct 2 '17 at 19:24
No exit code at all
â Andreas Winkler
Oct 2 '17 at 19:24
2
2
Not possible. All programs return an exit code upon exit. Re-run the command, and follow it up with
echo $?
.â DopeGhoti
Oct 2 '17 at 21:15
Not possible. All programs return an exit code upon exit. Re-run the command, and follow it up with
echo $?
.â DopeGhoti
Oct 2 '17 at 21:15
 |Â
show 5 more comments
1 Answer
1
active
oldest
votes
up vote
1
down vote
TCP networking is clearly working: you get a connection, and alternative connection tools such as nc
also demonstrate this.
It is either MySQL blocking the incoming connection itself (likely) or your version has been compiled with TCP Wrappers and that is set to require Reverse DNS and maybe even forward/reverse matching.
The MySQL documentation B.5.2.5 Host 'host_name' is blocked explains that too many incomplete connections will cause the originating IP address to be blocked until mysqladm flush-hosts
is run. Or you can login and execute FLUSH HOSTS
.
To check the TCP Wrappers configuration you need to look at /etc.hosts.allow
and /etc/hosts.deny
.
I ran mysqladmin flush-hosts with exit value 0 on host and then tried to connect. No change. Content of hosts.allow ALL:ALL Content of hosts.deny Empty
â Andreas Winkler
Oct 3 '17 at 8:48
How do I check if compiled with TCP Wrappers?
â Andreas Winkler
Oct 3 '17 at 8:50
lsof -i :3306 shows *:mysql LISTEN on server.
â Andreas Winkler
Oct 3 '17 at 8:53
When using tcpdump port 3306 and '(tcp-syn|tcp-ack)!=0' on server I get this when trying to connect to it: 10:55:44.195273 IP server2.xxx.xxx.mysql > xxx.xxx.12.89.53920: Flags [R], seq 1740903883, win 0, length 0
â Andreas Winkler
Oct 3 '17 at 8:57
I get this when trying to connect to db server: "ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 2 "No such file or directory"
â Andreas Winkler
Oct 3 '17 at 10:28
 |Â
show 1 more comment
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
TCP networking is clearly working: you get a connection, and alternative connection tools such as nc
also demonstrate this.
It is either MySQL blocking the incoming connection itself (likely) or your version has been compiled with TCP Wrappers and that is set to require Reverse DNS and maybe even forward/reverse matching.
The MySQL documentation B.5.2.5 Host 'host_name' is blocked explains that too many incomplete connections will cause the originating IP address to be blocked until mysqladm flush-hosts
is run. Or you can login and execute FLUSH HOSTS
.
To check the TCP Wrappers configuration you need to look at /etc.hosts.allow
and /etc/hosts.deny
.
I ran mysqladmin flush-hosts with exit value 0 on host and then tried to connect. No change. Content of hosts.allow ALL:ALL Content of hosts.deny Empty
â Andreas Winkler
Oct 3 '17 at 8:48
How do I check if compiled with TCP Wrappers?
â Andreas Winkler
Oct 3 '17 at 8:50
lsof -i :3306 shows *:mysql LISTEN on server.
â Andreas Winkler
Oct 3 '17 at 8:53
When using tcpdump port 3306 and '(tcp-syn|tcp-ack)!=0' on server I get this when trying to connect to it: 10:55:44.195273 IP server2.xxx.xxx.mysql > xxx.xxx.12.89.53920: Flags [R], seq 1740903883, win 0, length 0
â Andreas Winkler
Oct 3 '17 at 8:57
I get this when trying to connect to db server: "ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 2 "No such file or directory"
â Andreas Winkler
Oct 3 '17 at 10:28
 |Â
show 1 more comment
up vote
1
down vote
TCP networking is clearly working: you get a connection, and alternative connection tools such as nc
also demonstrate this.
It is either MySQL blocking the incoming connection itself (likely) or your version has been compiled with TCP Wrappers and that is set to require Reverse DNS and maybe even forward/reverse matching.
The MySQL documentation B.5.2.5 Host 'host_name' is blocked explains that too many incomplete connections will cause the originating IP address to be blocked until mysqladm flush-hosts
is run. Or you can login and execute FLUSH HOSTS
.
To check the TCP Wrappers configuration you need to look at /etc.hosts.allow
and /etc/hosts.deny
.
I ran mysqladmin flush-hosts with exit value 0 on host and then tried to connect. No change. Content of hosts.allow ALL:ALL Content of hosts.deny Empty
â Andreas Winkler
Oct 3 '17 at 8:48
How do I check if compiled with TCP Wrappers?
â Andreas Winkler
Oct 3 '17 at 8:50
lsof -i :3306 shows *:mysql LISTEN on server.
â Andreas Winkler
Oct 3 '17 at 8:53
When using tcpdump port 3306 and '(tcp-syn|tcp-ack)!=0' on server I get this when trying to connect to it: 10:55:44.195273 IP server2.xxx.xxx.mysql > xxx.xxx.12.89.53920: Flags [R], seq 1740903883, win 0, length 0
â Andreas Winkler
Oct 3 '17 at 8:57
I get this when trying to connect to db server: "ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 2 "No such file or directory"
â Andreas Winkler
Oct 3 '17 at 10:28
 |Â
show 1 more comment
up vote
1
down vote
up vote
1
down vote
TCP networking is clearly working: you get a connection, and alternative connection tools such as nc
also demonstrate this.
It is either MySQL blocking the incoming connection itself (likely) or your version has been compiled with TCP Wrappers and that is set to require Reverse DNS and maybe even forward/reverse matching.
The MySQL documentation B.5.2.5 Host 'host_name' is blocked explains that too many incomplete connections will cause the originating IP address to be blocked until mysqladm flush-hosts
is run. Or you can login and execute FLUSH HOSTS
.
To check the TCP Wrappers configuration you need to look at /etc.hosts.allow
and /etc/hosts.deny
.
TCP networking is clearly working: you get a connection, and alternative connection tools such as nc
also demonstrate this.
It is either MySQL blocking the incoming connection itself (likely) or your version has been compiled with TCP Wrappers and that is set to require Reverse DNS and maybe even forward/reverse matching.
The MySQL documentation B.5.2.5 Host 'host_name' is blocked explains that too many incomplete connections will cause the originating IP address to be blocked until mysqladm flush-hosts
is run. Or you can login and execute FLUSH HOSTS
.
To check the TCP Wrappers configuration you need to look at /etc.hosts.allow
and /etc/hosts.deny
.
edited Oct 3 '17 at 15:47
DopeGhoti
41k55080
41k55080
answered Oct 3 '17 at 7:46
roaima
40.1k547110
40.1k547110
I ran mysqladmin flush-hosts with exit value 0 on host and then tried to connect. No change. Content of hosts.allow ALL:ALL Content of hosts.deny Empty
â Andreas Winkler
Oct 3 '17 at 8:48
How do I check if compiled with TCP Wrappers?
â Andreas Winkler
Oct 3 '17 at 8:50
lsof -i :3306 shows *:mysql LISTEN on server.
â Andreas Winkler
Oct 3 '17 at 8:53
When using tcpdump port 3306 and '(tcp-syn|tcp-ack)!=0' on server I get this when trying to connect to it: 10:55:44.195273 IP server2.xxx.xxx.mysql > xxx.xxx.12.89.53920: Flags [R], seq 1740903883, win 0, length 0
â Andreas Winkler
Oct 3 '17 at 8:57
I get this when trying to connect to db server: "ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 2 "No such file or directory"
â Andreas Winkler
Oct 3 '17 at 10:28
 |Â
show 1 more comment
I ran mysqladmin flush-hosts with exit value 0 on host and then tried to connect. No change. Content of hosts.allow ALL:ALL Content of hosts.deny Empty
â Andreas Winkler
Oct 3 '17 at 8:48
How do I check if compiled with TCP Wrappers?
â Andreas Winkler
Oct 3 '17 at 8:50
lsof -i :3306 shows *:mysql LISTEN on server.
â Andreas Winkler
Oct 3 '17 at 8:53
When using tcpdump port 3306 and '(tcp-syn|tcp-ack)!=0' on server I get this when trying to connect to it: 10:55:44.195273 IP server2.xxx.xxx.mysql > xxx.xxx.12.89.53920: Flags [R], seq 1740903883, win 0, length 0
â Andreas Winkler
Oct 3 '17 at 8:57
I get this when trying to connect to db server: "ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 2 "No such file or directory"
â Andreas Winkler
Oct 3 '17 at 10:28
I ran mysqladmin flush-hosts with exit value 0 on host and then tried to connect. No change. Content of hosts.allow ALL:ALL Content of hosts.deny Empty
â Andreas Winkler
Oct 3 '17 at 8:48
I ran mysqladmin flush-hosts with exit value 0 on host and then tried to connect. No change. Content of hosts.allow ALL:ALL Content of hosts.deny Empty
â Andreas Winkler
Oct 3 '17 at 8:48
How do I check if compiled with TCP Wrappers?
â Andreas Winkler
Oct 3 '17 at 8:50
How do I check if compiled with TCP Wrappers?
â Andreas Winkler
Oct 3 '17 at 8:50
lsof -i :3306 shows *:mysql LISTEN on server.
â Andreas Winkler
Oct 3 '17 at 8:53
lsof -i :3306 shows *:mysql LISTEN on server.
â Andreas Winkler
Oct 3 '17 at 8:53
When using tcpdump port 3306 and '(tcp-syn|tcp-ack)!=0' on server I get this when trying to connect to it: 10:55:44.195273 IP server2.xxx.xxx.mysql > xxx.xxx.12.89.53920: Flags [R], seq 1740903883, win 0, length 0
â Andreas Winkler
Oct 3 '17 at 8:57
When using tcpdump port 3306 and '(tcp-syn|tcp-ack)!=0' on server I get this when trying to connect to it: 10:55:44.195273 IP server2.xxx.xxx.mysql > xxx.xxx.12.89.53920: Flags [R], seq 1740903883, win 0, length 0
â Andreas Winkler
Oct 3 '17 at 8:57
I get this when trying to connect to db server: "ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 2 "No such file or directory"
â Andreas Winkler
Oct 3 '17 at 10:28
I get this when trying to connect to db server: "ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 2 "No such file or directory"
â Andreas Winkler
Oct 3 '17 at 10:28
 |Â
show 1 more comment
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f395700%2fmysql-remote-connection-not-succeeding%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
From a remote host, are you able to
nc -z -w 2 dbhost.example.com 3306
successfully?â DopeGhoti
Oct 2 '17 at 18:41
The command executes without any return with the correct address.
â Andreas Winkler
Oct 2 '17 at 19:03
With what exit code?
â DopeGhoti
Oct 2 '17 at 19:04
No exit code at all
â Andreas Winkler
Oct 2 '17 at 19:24
2
Not possible. All programs return an exit code upon exit. Re-run the command, and follow it up with
echo $?
.â DopeGhoti
Oct 2 '17 at 21:15