I’m working on a CGI application written using C++ with the C MySQL adapter. I’m trying to run a query on two databases, so I want to connect to a MySQL server without choosing a default database. Is this possible? I’m using mysql_real_connect().
I’m working on a CGI application written using C++ with the C MySQL adapter.
Share
mysql_real_connect() can take a
NULLparameter for the database paramter, and this selects the default. Just ensure that the user has no default database set.