remote connection to mysql
Hi, I'm trying to connect remotely to my database server. It is MySQL 4.1.7 which I install from ports. I created a user with permissions to connect from any remote location. I'm using Perl DBI, like this: use DBI; my $dbh = DBI-connect( 'dbi:mysql:[EMAIL PROTECTED]:3306', 'user', 'passwd', { RaiseError = 1, AutoCommit = 1 } ); Yet I continue to receive connection errors. Can't connect to the MySQL server on 3306 (10061). I'v verified that the server is listening on the port. I also found some info on google about Perl DBD::mysql problems. I tried resetting the user's password with the OLD_PASSWORD option. Nothing works. Can anyone help??? ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: remote connection to mysql
[EMAIL PROTECTED] wrote: use DBI; my $dbh = DBI-connect( 'dbi:mysql:[EMAIL PROTECTED]:3306', 'user', 'passwd', { RaiseError = 1, AutoCommit = 1 } ); Yet I continue to receive connection errors. Can't connect to the MySQL server on 3306 (10061). I'v verified that the server is listening on the port. I also found some info on google about Perl DBD::mysql problems. I tried resetting the user's password with the OLD_PASSWORD option. Nothing works. Can anyone help??? Error code 10061 = connection refused. Are you sure there is no firewall in place blocking access to port 3306? Can you telnet to host.org 3306? If so, you might want to try changing your script like this: use DBI; my $dbh = DBI-connect( 'dbi:mysql:database=DATABASE;host=REMOTE_IP;port=3306', 'user', 'passwd', { RaiseError = 1, AutoCommit = 1 } ); Otherwise if you are running 4.10 you might want to use sysctl to set net.inet.ip.portrange.randomized to 0. Use may also want to use sockstat to make sure your script is actually trying to connect to the right IP. ALeine ___ WebMail FREE http://mail.austrosearch.net ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: remote connection to mysql
On Mon, 21 Feb 2005, Matt wrote: Hi, I'm trying to connect remotely to my database server. It is MySQL 4.1.7 which I install from ports. I created a user with permissions to connect from any remote location. I'm using Perl DBI, like this: Are you sure that you set up MySQL to accept TCP connections? I think it defaults to local sockets only; you can verify by running netstat -na and seeing if there's anything listening on port 3306. Mike Silby Silbersack ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: remote connection to mysql
Mike Silbersack wrote: On Mon, 21 Feb 2005, Matt wrote: Hi, I'm trying to connect remotely to my database server. It is MySQL 4.1.7 which I install from ports. I created a user with permissions to connect from any remote location. I'm using Perl DBI, like this: Are you sure that you set up MySQL to accept TCP connections? I think it defaults to local sockets only; you can verify by running netstat -na and seeing if there's anything listening on port 3306. Mike Silby Silbersack Thanks for your reply. I do see this in netstat output: tcp4 0 0 192.168.2.23.3306 *.*LISTEN ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]