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