Assuming a my.cnf file which looks like this: [client] port=3306 socket=/path/to/mysql.sock [app] user=appuser password=apppwd host=my.host.com
Ignore for now the insecurity of putting a password in the my.cnf file. This is mostly a hypothetical question at the moment.
Calling mysql_options(MYSQL, MYSQL_READ_DEFAULT_FILE, "/path/to/my.cnf"); and mysql_options(MYSQL, MYSQL_READ_DEFAULT_GROUP, "app"); in the client will read the options in these two groups.
How, if at all, would something like this be useful to mysql_real_connect? From my research it appears that you still need to specify the user, host, pwd and port (assuming TCP/IP connection) when calling mysql_real_connect(), so setting these parms in the my.cnf file does not really help for this scenario. Something (a non-API function, most likely) would still need to parse the file separately and grab the parms for passing to mysql_real_connect().
Is this an accurate assessment?
--V
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]