<div>Have you tried setting the bind-address directive in my.cnf?</div>
<div> </div>
<div>Brock<br><br> </div>
<div><span class="gmail_quote">On 10/18/06, <b class="gmail_sendername">Clayton Smith</b> <<a href="mailto:ces.fci@gmail.com">ces.fci@gmail.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">I've been trying to connect to a remote mysql server..<br><br>I have made sure skip-networking is commented out in the
my.cnf<br><br>I have the iptables rule set correctly (I copy and pasted a rule that<br>the webhost is/was using for mysql dumps).<br>--------------------------------------------<br>-A newconnection -s x.x.x.x -p tcp -m tcp --dport 3306 -j ACCEPT
<br>--------------------------------------------<br><br>It is being called like so:<br>--------------------------------------------<br>/usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql<br>--pid-file=/var/run/mysqld/mysqld.pid --skip-locking --port=3306
<br>--socket=/var/run/mysqld/mysqld.sock<br>--------------------------------------------<br><br>Here is the output when trying to connect remotely using telnet from<br>3 different allowed locations(local shell, remote shell and another
<br>remote shell):<br>--------------------------------------------<br>[webdev@local ~]$ telnet <a href="http://www.remote.com">www.remote.com</a> 3306<br>Trying xx.xx.xx.xx...<br>Connected to <a href="http://www.remote.com">
www.remote.com</a> (xx.xx.xx.xx).<br>Escape character is '^]'.<br>Connection closed by foreign host.<br>--------------------------------------------<br><br>Here is the output when trying to connect locally using telnet (this
<br>is assuming I've setup a user with the proper permissions):<br>--------------------------------------------<br>remote:~# telnet <a href="http://127.0.0.1">127.0.0.1</a> 3306<br>Trying 127.0.0.1...<br>Connected to <a href="http://127.0.0.1">
127.0.0.1</a>.<br>Escape character is '^]'.<br>7<br>4.0.24_Debian-10sarge2ÉYYcAY}*UOi,Connection closed by foreign host.<br>--------------------------------------------<br><br>Here is the output of netstat after trying to connect remotely using PHP:
<br>--------------------------------------------<br>remote:~# netstat -an | grep 3306<br>tcp 0 0 <a href="http://0.0.0.0:3306">0.0.0.0:3306</a> 0.0.0.0:* LISTEN<br>tcp 0 0 local_ip:3306 remote_ip:13238 TIME_WAIT
<br>--------------------------------------------<br><br>Here is the error on the PHP side I will get:<br>--------------------------------------------<br>Lost connection to MySQL server during query<br>--------------------------------------------
<br><br>I also granted permissions like so:<br>--------------------------------------------<br>grant SELECT, DELETE, UPDATE on remote.* to 'remote'@'<a href="http://vpn.local.com">vpn.local.com</a>'<br>identified by 'password'
<br>--------------------------------------------<br><br>Here is the contents of /etc/mysql/my.cnf minus the comments:<br>--------------------------------------------<br>[client]<br>port = 3306<br>socket = /var/run/mysqld/mysqld.sock
<br><br>[mysqld_safe]<br>socket = /var/run/mysqld/mysqld.sock<br>nice = -5<br><br>[mysqld]<br>user = mysql<br>pid-file = /var/run/mysqld/mysqld.pid<br>socket = /var/run/mysqld/mysqld.sock<br>port = 3306
<br>basedir = /usr<br>datadir = /var/lib/mysql<br>tmpdir = /tmp<br>language = /usr/share/mysql/english<br>skip-external-locking<br>key_buffer = 16M<br>max_allowed_packet = 16M<br>thread_stack = 128K
<br>query_cache_limit = 1048576<br>query_cache_size = 26214400<br>query_cache_type = 1<br>skip-innodb<br><br>[mysqldump]<br>quick<br>quote-names<br>max_allowed_packet = 16M<br><br>[mysql]<br><br>[isamchk]
<br>key_buffer = 16M<br>--------------------------------------------<br><br>I've scoured the web.. and I'm at a loss. I'm not a network guru but<br>this seems like it is more difficult then it needs to be...<br><br>
The server does have a heartbeat channel setup using HA Linux but I<br>don't know if that would affect this at all.<br><br>Clayton<br><br>_______________________________________________<br>TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
<br><a href="mailto:tclug-list@mn-linux.org">tclug-list@mn-linux.org</a><br><a href="http://mailman.mn-linux.org/mailman/listinfo/tclug-list">http://mailman.mn-linux.org/mailman/listinfo/tclug-list</a><br></blockquote></div>
<br>