Read mysql command output : HTTP Reponse « Network « Ruby






Read mysql command output



require 'socket' 
client = TCPSocket.open('127.0.0.1', 'finger') 
client.send("mysql\n", 0) # 0 means standard packet 
puts client.readlines 
client.close 

 








Related examples in the same category

1.Checking for Errors and Redirects
2.Grabbing the Contents of a Web Page.rb
3.Get response encoding and body
4.Get url and response
5.Get response code
6.get server information from the response
7.Each key in the response
8.For each segment received
9.Zip header
10.Read a web page