mysql c connector 6.1.11 client to a mysql 8 server connection
Posted by: reda guernane
Date: October 12, 2020 12:17PM

hi

I have a Mysql server 8.0.21 running on ubuntu 20.04. I also have on this latter a win7 32bit VB guest machine connected via a host-only adapter to the host.

On the guest machine I have a basic C program using the c connector 6.1.11 to try to connect to the server running on the host, here's the code:

#include <stdio.h>
#include <mysql.h>

MYSQL *conn;
unsigned long version = 1;
int main()
{
conn = mysql_init ( NULL );
if(mysql_real_connect ( conn, "169.254.128.100", "myuser",
"mypass", "my_schema", 3306, NULL, 0 )==NULL){
fprintf(stderr, "%s\n", mysql_error(conn));
}
mysql_close ( conn );
return 0;
}

running the program gives me the error:
SSL connection error: unknown error number

I checked that :
1- I can connect fine using the ODBC DSN from the guest
2- the server has no SSL configured by default, the server status command tells me "SSL not in use"
3- i could swear it was working using Qt's QMYSQL plugin (which just wraps the c api) before upgrading my machine from 18.O4 to 20.04, in either case using the 8.0.21 version.

thanks

Options: ReplyQuote


Subject
Views
Written By
Posted
mysql c connector 6.1.11 client to a mysql 8 server connection
2072
October 12, 2020 12:17PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.