Still nobody has answered my question. Has anyone here even tried linking with libmysqld.a before?
- Steve --- Steven Webb <[EMAIL PROTECTED]> wrote: > Nobody answered my question, so I felt like I should > ask again ... > > I'm using libmysqld to embed a mysql server in my C > app. However, I'd also like to connect to other > remote mysql databases as well, but the > "mysql_real_connect" command doesn't seem to be > working when trying to connect to a remote database > in > the same app as the libmysqld stuff. The connect > works, but I think that it's connecting to my local > database and not the remote one. Here's a little > code: > > mysql_server_init(sizeof(server_args) / > sizeof(char > *), server_args, server_groups); > > // Here's the embedded database. This works. > one = db_connect(NULL); > db_do_query(one, "CREATE DATABASE > my_blah_database"); > mysql_close(one); > one = db_connect("my_blah_database"); > db_do_query(one, "create table blank (num int)"); > mysql_close(one); > > /* This must be called after all other mysql > functions */ > mysql_server_end(); > > // Here's the remote connection - it connects to > the > same local machine, not the remote machine. > two = db_remote_connect > ("remote_machine","remote","remote","dbname"); > db_do_query(two, "SHOW DATABASES"); > > > > > Has anyone tried this. I'm using the 4.0.4 beta > source tree. > > __________________________________________________ > Do you Yahoo!? > Y! Web Hosting - Let the expert host your web site > http://webhosting.yahoo.com/ > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list > archive) > > To request this thread, e-mail > <[EMAIL PROTECTED]> > To unsubscribe, e-mail > <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: > http://lists.mysql.com/php/unsubscribe.php > __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php