We help IT Professionals succeed at work.

MySQL server communications / commands via a TCP/IP client???

keith1001
keith1001 asked
on
I have a MySQL server on a network and I have a TCP/IP client that can send text and receive text strings.

Is it possible to have the TCP/IP client send a connection command, then and insert command?
Comment
Watch Question

Dave BaldwinFixer of Problems
Most Valuable Expert 2014

Commented:
No.  MySQL has it's drivers and communications protocols.  You can not connect directly to it with something like telnet.  You can, in theory, connect to the server with telnet or SSH and run the 'mysql' command line program.

If you are using a programming language, you can use the appropriate MySQL driver and connect that way.  See the list here: https://www.mysql.com/products/connector/
F P
Top Expert 2015

Commented:
You need to be able to connect on port 3306 using the "TCP/IP Client" you mentioned. I don't know what specifically that "Client" is, but if it supports any of these connectors listed:

https://www.mysql.com/products/connector/

... then sure. I don't see why it couldn't. You might also want to checkout Mirth Connect:

https://www.mirth.com/Products-and-Services/Mirth-Connect

Which only charges for support, but is designed to bring interop to differing systems into a single java interface. The community edition and your own code is free if there isn't already something built to work.

Author

Commented:
@dave that could possibly work.  My client app though is limited, it can only send strings and receive strings.

So are you saying I could just connect, then send a MySQL login command(String) and then wait a few seconds and then send the INSERT sql command (string)?

Author

Commented:
@dave, I tried Telnet but got bergish (I assume binary) back and could not do anything at all.
Fixer of Problems
Most Valuable Expert 2014
Commented:
That is correct, you can Not connect directly to MySQL.  You need to login to that machine with a valid user login and run the 'mysql' command line program (which is a utility program, not the server daemon).