On Jul 23, 2008, at 1:35 AM, Nick Hastings wrote:
> My understanding is that the server is defaulting to localhost, the
> name is coming for my login username, password from my ~/.my.cnf and
> default port 3306 is assumed.
> However now I want to use mysql procedures in my queries so I added
> c.set_option(new mysqlpp::MultiResultsOption( true ) );
> before tue c.connect() call. However, after doing this I found
> that I am unable to connect to the database unless I explicitly define
> all of server, user, password (and maybe port).
I don't see why that would be the case. Options are processed
immediately in set_option(), and they don't affect the connect()
I suggest that you enable (and catch) exceptions, since they can
indicate problems better, and get the problem distilled down to a
single line's difference: a program that connects fine with the
default options when the MultiResultsOption line is commented out, and
fails with it enabled. You may want to do this to one of the
examples, rather than to your own program, because they're known to be
If it still fails in that case, post the text of any exceptions you get.