[Sqlrelay-discussion] mysql_options and ssl
Brought to you by:
mused
|
From: elijah <el...@ri...> - 2006-11-25 23:19:39
|
Hello all, We are using sqlrelay with mysql over ssl. In order to get this to work, we needed to patch mysqlconnection.C so that it would read a [sqlrelay] section of /etc/mysql/my.cnf. Perhaps there is another way to do this? Is there a reason why mysqlconnection.C currently does not call mysql_options? Here is an example of what we did: in /etc/mysql/my.cnf -------------------------------------- [sqlrelay] ssl-ca = /etc/certs/roots/cacert-root.pem ssl-cert = /etc/certs/mx1.riseup.net/cert.pem ssl-key = /etc/certs/mx1.riseup.net/key.pem the world's smallest patch: ------------------------------------- --- sqlrelay-0.38/src/connections/mysql/mysqlconnection.C +++ sqlrelay-0.38-mysql_options/src/connections/mysql/mysqlconnection.C @@ -73,6 +73,7 @@ fprintf(stderr,"mysql_init failed\n"); return false; } + mysql_options(&mysql,MYSQL_READ_DEFAULT_GROUP,"sqlrelay"); if (!mysql_real_connect(&mysql,hostval,user,password,dbval, portval,socketval,clientflag)) { #else -elijah p.s. thanks to David for sqlrelay! |