Connecting to Mysql with ODBC vs C library

Hi All

I read in the MySQL 5 study guide that if you connect to MySQL with the C library that this connection will be alot faster than connecting with the ODBC driver. How do I connect with the C library? If this is not posible what other way of connecting can I use that does not use the ODBC?

Thank you


This applies mainly to development.

If you’re developing application use normal interface to MySQL, not ODBC. If it is third party application and it supports ODBC and native MySQL driver, use last one.

Thanx for your reply Peter

I know this is more a development problem than a DBA function and I hope you can help me with this. My developer keeps on telling me that the C library connection is written specifically for .net connections and doesn’t work well with C++ connections(our app is written in C++). All the manuals and documentation says that the connection works very well with C++. Is this true? Where can I get documentation about this that will help more for a developer than a DBA?

Thanx again for your help.


For .NET you should use native MySQL .NET connector not wrapper via ODBC.

Our application is written in C++ and we are looking for a way to connect to MySQL that works beter/faster than the ODBC. ODBC gives alot of problems when we run big reports. What can we use?

In this case you simply can use libmysql.

You developer is wrong. Connector .NET is completely different thing

For C++ you could use: mysql++ (using MySQL C API)