Ask Your Question

C++ connect to mysql in fedora 25

asked 2017-05-21 16:34:44 -0600

capt gravatar image

I have looked over the thousands of pages attempting to instruct me on how to install a C++ connector to mysql. Some contrdict others; some are so laboriously linked that when hafe way through I forget why i wanted to do this. In other Linux systems it is somewhat simple: add a couple of labraries and include the headers in the c++ file. With Fedora it seems that the process of getting and installing the libraries is a task for only the most masterfull craftsmen, with copious time.

Is there any help available that explains how I can install a connector (either native or odbc) with relative ease in Fedora?

Please accept my thanks in advance.

edit retag flag offensive close merge delete


If you mention the libraries needed we can help you installing them, in fedora the header files are in the package name xxx-devel to install mysql header files you may need to do this sudo dnf install mariadb-devel there is also this package mysql++. : C++ wrapper for the MySQL C API you could install it with sudo dnf install mysql++ not sure this is what you looking for but may it help.

aeperezt gravatar imageaeperezt ( 2017-05-21 21:12:16 -0600 )edit

Thanks. At this point I'm not sure any more which headers I need. I believe the following are necessary files and headers:, mysqlconnection.h, mysqldriver.h.

I am not sure that these are the lot. I tried getting info from the mysql guys but that is a merry chase catch 22.

capt gravatar imagecapt ( 2017-05-22 14:03:05 -0600 )edit

If you install mariadb-devel, mysql++-devel and mariadb-connector-c-devel and look into /usr/include/mysql/ to see if you find what you are looking for

aeperezt gravatar imageaeperezt ( 2017-05-22 22:32:36 -0600 )edit

Thankswill gove ot a try.

capt gravatar imagecapt ( 2017-05-24 14:39:48 -0600 )edit

thanks. will give it a try.

capt gravatar imagecapt ( 2017-05-24 14:41:08 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-06-24 20:28:09 -0600

If ever, I found a reference to mysql++ (which exists in dnf's repo) which seem to do the job.

edit flag offensive delete link more

Question Tools


Asked: 2017-05-21 16:34:44 -0600

Seen: 584 times

Last updated: Jun 24 '17