For the last 2 months I have tried to establish connection between COBOL and MySQL. Hope I have succeeded a stage in this regard.
I have used
Remote server: MySQL Server 4.0.17-max in Suse Linux
Client : Windows 2000
Microsoft VC++ 6.0
CA-Realia COBOL Compiler Version 6.0.45
Microsoft (R) Incremental Linker Version 6.00.8168
MySQL 4.0.17.max-debug for Windows
In COBOL I can call C functions as external subroutines. I have called the MySQL C API functions from COBOL and try to invoke the connection to MySQL. To do this currently I am in need to call mysql_init, mysql_real_connect, mysql_error and mysql_close functions. I have coded in COBOL and executed, each time when I struck up with error I have mailed to this list, but I could not find any favorable response.
Finally now, I have reached the status of connection establishment between COBOL and MySQL with the error message;
"Can't connect to MySQL server on 'neptune' (10049)"
according to the manual from the MySQL site, this error happened due to improper Port No or Socket information. But, I have passed the default Port No.3306 and NULL for the socket as parameter to the function mysql_real_connect.
Can any one suggest me what else creating this error?
I think to establish connection in this way it does not require ODBC settings and DNS in the client machine. It just established the connection via *wsock32* library of the C (here it is VC++).
I have further doubts, Is there a need of any SSH in client side? I don’t have clear idea about this…
I hope if I succeed it will be a success to MySQL team too…