Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Unable to connect to remote MySQL

While setting developer portal from remote SQL server we see below error while configuration.

Resolve all issues below to continue the installation. For help configuring your database server, see the installation handbook, or contact your hosting provider.

Failed to connect to your database server. The server reports the following message: SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'reading initial communication packet', system error: 104.

  • Is the database server running?
  • Does the database exist, and have you entered the correct database name?
  • Have you entered the correct username and password?
  • Have you entered the correct database hostname?

==

Made below changes in /etc/hosts.allow

==

# hosts.allow This file contains access rules which are used to

# allow or deny connections to network services that

# either use the tcp_wrappers library or that have been

# started through a tcp_wrappers-enabled xinetd.

#

# See 'man 5 hosts_options' and 'man 5 hosts_access'

# for information on rule syntax.

# See 'man tcpd' for information on tcp_wrappers

#

SSHD: ALL

mysqld: ALL: allow

==

mysqld is running:

ps -ef |grep mysqld

root 18572 1 0 18:33 pts/0 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --pid-file=/var/run/mysqld/mysqld.pid --basedir=/usr --user=mysql

mysql 18674 18572 0 18:33 pts/0 00:00:00 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --log-

==

service iptables status iptables: Firewall is not running.

-Vinay

Solved Solved
0 6 5,399
1 ACCEPTED SOLUTION

Issue was resolved as there was a issue at firewall end from devportal server to mysql server.Network team resolved it and able to connect now.

View solution in original post

6 REPLIES 6