Tring to connect to MySQL using Xp's Telnet, getting wierd outpu

bobcpg

Senior member
Nov 14, 2001
951
0
0
I have a "Fileserver" that i installed IIS, PHP and mysql. Running XP SP2 firewall disabled.

I'm tring to connect to the mysql on the "Fileserver" from another networked computer, via command line, to run sql commands.

I can connect fine with the mysql client software, but I want to use windows telnet to connect to get the command line interface.

when i run telnet 192.168.x.x 3306 on the client run line, i get a pause and some garbled output and then i get "Connection lost..."

I have also setup SSH on the file server. I can SSH into the fileserver but when i try to run the mysql -u root -p it just clocks.

any ideas.
thanks, bob
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
That's because telnet is not a mysql client, it is only a tcp pipe. The best way to administer the server remotely is to ssh in and run mysql on the server. The next best way is to tunnel the appropriate port through ssh and use mysql on the machine you are sitting at. The next best way after that is to use mysql (running on local machine) to connect to the database on the remote machine. Use the -h switch to get it to connect to a different host.
 

bobcpg

Senior member
Nov 14, 2001
951
0
0
Originally posted by: kamper
The best way to administer the server remotely is to ssh in and run mysql on the server.

Ok, i setup OpenSSH on the server. I am able to SSH and getinto the server command line. But when i try to execure MySQL.exe it just clocks.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
It "clocks"? Do you mean "locks"? And do I understand correctly that you installed an openssh server on a windows machine? Is that via cygwin or something?
 

bobcpg

Senior member
Nov 14, 2001
951
0
0
Originally posted by: kamper
It "clocks"? Do you mean "locks"? And do I understand correctly that you installed an openssh server on a windows machine? Is that via cygwin or something?

By clocks i mean, that is brings me down to the next line, but its blank. I can type stuff but there is no response from the server.

I am able to ssh tunnel and run the mysql from the client.

thanks,
bob
 

Firus

Senior member
Nov 16, 2001
525
0
0
how exactly are you connecting?
are you doing "telnet 192.168.x.x"
then once connected firing a "mysql -u root -p"?

It could be the the character encoding does not match up on SQL and the telnet client. I don't know how to fix it though?
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
I think he was originally trying to telnet directly to the mysql server instead of a telnet server. That could work, but only if he knew exactly how the mysql client communicates with the server and didn't mind typing it all in blind :p
 

bobcpg

Senior member
Nov 14, 2001
951
0
0
Originally posted by: Firus
how exactly are you connecting?
are you doing "telnet 192.168.x.x"
then once connected firing a "mysql -u root -p"?

It could be the the character encoding does not match up on SQL and the telnet client. I don't know how to fix it though?

Yes, first "telnet 192.168.x.x"
then "mysql -u root -p"

then it gives me a bunch of garbled characters and about 3 seconds later it says connection lost

or

if i connect through ssh, and i type mysql -u root -p it returns me to the next line and its blank but i can still can type. But anything i type doesn't return anything off the server.

I am able to use mysql -h 192.168.x.x -u root -p and that works, and even tunneling through the ssh and using the mysql -h 127.0.0.1 -u root -p works.

thanks,bob