[svlug] Remote connections to MySQL

Marco Walther marco at sonic.net
Mon Oct 29 21:15:20 PST 2007


On Monday 29 October 2007 18:45, Skip Evans wrote:
> Hey all,
>
> I am trying to connect to MySQL from remote
> workstations on our LAN. I've Googled my buns off,
> gotten the config set up the way it seems to say
> on the many pages I've checked out, but still
> unable to connect. Here's where I am now.
>
> The /etc/my.cnf file on the server contains this:
>
> [mysqld]
> user = mysql
> pid-file = /usr/local/mysql/venomouspenguin.com.pid
> socket = /tmp/mysql.sock
> port = 3306
> basedir = /usr
> datadir = /usr/local/mysql
> tmpdir = /tmp
> language = /usr/local/share/mysql/english/
> bind-address = 192.168.1.101
> # skip-networking
>
> (The server is running FreeBSD 6.0, and the
> workstations are Xubuntu.)
>
> I'm sure it's getting this config file, because I
> introduced errors to see if they'd cause MySQL to
> fail to start and report errors, and it did.
>
> I then tried to test the connection with telnet
> and got the following:
>
> sevans at Xu-400:~$ telnet 192.169.1.101 3306
> Trying 192.169.1.101...
>
> sevans at Xu-400:~$ telnet 192.168.1.101 3306
> Trying 192.168.1.101...
> Connected to 192.168.1.101.
> Escape character is '^]'.
> 4
> 5.0.33B0f2d$##,$+M~WvnCCeUXConnection closed by
> foreign host.

Your telnet does not talk mysql;-)

It did connect to the mysql server but then the protocol is binary. The 
gibberish are just some bytes which happen to be valid ASCII.

Try `mysql -h 192.168.1.101 -P 3306' ;-)

Thanks,
-- Marco


>
> When the telnet is first attempted it seems to
> connect, then spits out those gibberish looking
> characters, and a few seconds later says
> "Connection refused..."
>
> It doesn't say connection refused, so it seems to
> get there for a bit, but then closes it.
>
> I've been working on this in the evenings for
> three days now, but am stuck here.
>
> Any help would be greatly appreciated.
>
> Thanks!
>
> Skip




More information about the svlug mailing list