Skip to content

Commit a816404

Browse files
committed
Hint at workaround
1 parent 74ff516 commit a816404

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/connection.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,12 @@ SEXP RS_MySQL_createConnection(SEXP mgrHandle, RS_MySQL_conParams *conParams) {
3939
conParams->port, conParams->unix_socket, conParams->client_flag)){
4040

4141
RS_MySQL_freeConParams(conParams);
42+
//#define CR_SSL_CONNECTION_ERROR 2026
43+
char * hint = mysql_errno(my_connection) == 2026 ? "\nTo suppress this try seting envvar MARIADB_TLS_DISABLE_PEER_VERIFICATION=1" : "";
4244

4345
error(
44-
"Failed to connect to database: Error: %s\n",
45-
mysql_error(my_connection)
46+
"Failed to connect to database: Error: %s%s",
47+
mysql_error(my_connection), hint
4648
);
4749
}
4850

0 commit comments

Comments
 (0)