Re: mysql_real_connect() and options files
Date: December 19, 2011 10:54AM
I just had a look at the source code (sql-common/client.c) ... and the manual.
Maybe I have misunderstood how the mysql_real_connect() works... It appears that you have to define the options file with mysql_options(), to force the client to read from an option file. I thought it was done my default, trying to read from ~/.my.cnf, /etc/my.cnf, $MYSQL_HOME/my.cnf, etc.
In my previous configuration, I have use the default UNIX socket /tmp/mysql.sock and my libmysqlclient application could connect because it was using that default socket file name too...
Can someone confirm please?
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.