On Thu, 16 Oct 2003, Serge Cohen wrote: > [...] > Now I'd like to use the libmysqld, so that I can have a an embedded > server, still this same application should be able to connect to a DB > server (over internet). > From what I've read and tried, the libmysqld library does not provide > the functionality to connect to a 'standalone' server (over IP or > socket).
If I understand your question correctly, you're asking this: Can your application that has been linked with libmysqld still connect to an external mysql server? If that's so, my answer is yes. The only difference between an application linked with limysqlclient and libmysqld is that one is capable of being a server as well as a client (the one linked with libmysqld) and one is purely a client (the one linked with limysqlclient) The limitation is that that an application linked with libmysqld cannot receive TCP/IP connections to it - you have to implement this yourself. > I have the impression that to have the two functions (embedded server > and connection to standalone server) a single application should link > to both libmysqlclient and libmysqld. No: You only need to link one of the libraries depending on what your needs are. If you do not need to have a server *within* your application then you should link libmysqlclient only. But if you want to have a server in your application but have the same application connect to an external server (over TCP/IP) then you should link libmysqld. > The problem I see there is that as these two libraries have exactly the > same API IMHO, I see it as the "beautiful thing" about them. > I have no precise clue on how to link both libraries and know precisely > which implementation of a library function I'm calling. You only need to know how to link either, you don't need both, as I explained above. > So far the only solution that I kind of see is to modify the sources of > one of the library so that it has a different API than the other (like > modifying the mysql_ prefix of the API functions to something else - - > -mysqld_ for example-). But this solution does not seems very clean to > me, unless there is a standard way to do it from within the > configure/build process of mysql (which I've not found). Definately not very clean, just read through the docs for MySQL 4.0.15 again and again and again (and once more) then you'll begin to link things up - ok maybe you won't need to read them that many times (you may be much smarter than I am). > I'd be very grateful to anyone who can provide : > 1. a way to have both functionalities using a single API/library. Explained. > 2. a better idea to avoid the API clash while linking to both library. Explained (you don't need to link both libraries) > 3. a 'clean' (or at least automatic) way to modify one of the API. > Or any insight on these matters. You don't need to 'clean' either of the API's as explained: In my opinion the folks at MySQL are about the MOST brilliant guys I've come across! I do greatly appreciate the work they do! Cheers, Gerald. -- Kampala, Uganda East Africa. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]