At 11:09 -0800 11/6/02, Steven Webb wrote:
>I'm using libmysqld so I can have an "embedded" mysql
>server in my application. It helps with performance
>because there is not socket communication and all I/O
>is done from the program directly to the files.
>Anyway, I have the need to also connect to a remote
>database in the same application. My code works fine
>with the local "embedded" mysql server, I can connect
>to the local server, create a database and manipulate
>the data, but when I try to connect to a remote
>database, it fails. The C function that I'm using is
>"mysql_real_connect". The "mysql_connect" that you're
>talking about is just a wrapper function that I wrote.
> The mysql_real_connect() is down further in the code.
>Did you get my code? I sent it to the list, but the
>list bounced it because the list didn't allow
>Anyway, According to the docs for the mysqld library
>There is nothing that says that the mysql_real_connect
>should work any differently than the one in the normal
Nothing there, perhaps. But the general description of the
embedded server points out that it does no networking.
You cannot use an embedded app to connect to remote servers,
nor can external clients connect to the embedded server.
(This is one reason the manual says embedded servers can't
be used in replication.)
> So, I'm thinking that either the
>documentation is incorrect (mysql_real_connect
>*DOESN'T* include any socket-level capability in the
>mysqld lib like it does in the normal library) or I'm
>just doing something wrong when I try to connect to a
>remote database with mysql_real_connect. The man page
>for mysql_real_connect is here: