Sunday 15 February 2015

ios - How to set mysql_protocol_tcp in Objective C Mysql client -


I downloaded the MySQL source and libraries of Carl Craft and created a MySQL Client Lib for iOS 6. The local mysql database even handled the Blob data well.

The next step was to port in a remote database. After downloading various libraries and tearing my hair, I went looking for a pack solution.

I got the SSH Tunnel Library (FREE 30-day trial - and $ 149 for Chuckack) Have downloaded He also worked for the first time. It was a pleasure after the day and the nervousness of not building, not adding, not compiling, no i386 blah blah blah !!

OK, so here's the kicker. Now I want to work with remote database When I forward 3306 SST ports via a SSIT port 22 to 3306 on a database machine behind the firewall, I now close mysqld, and my host is Local Host Port 3306. There is a slight problem with my SSL

The client's default launch on Unix / Mac machine is to look for socket connections on the localhost.

I get the following error:

Error: Can not connect to the local MySQL server with the socket '/tmp/mysql.sock' (38) < / P>

For mysql I need a TCP protocol option to start, with a command line, it is easy --protocol = TCP.

With an iOS customer, this is not easily obvious. I did a search and in mysql.h we have mysql_protocol_type and constants mysql_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP etc.

The missing knowledge I have, to set programmatically in Objective-C.

is a server object that defines the parameter (server, name, port, user, password) and the next object is a connection object that calls mysql_init (). Does anyone have any clue on this?

BTW: A man of Karl Kraft and Shil, must keep his blood preserved for future generations. They saved me a lot of time.

Thanks in advance.

I took some time to find out with mysql client, if you were 'localhost ', Then this is ////. However if you specify the localhost as 127.0.0.1, then it connects to a TCP protocol equal to --protocol = TCP.

No comments:

Post a Comment