C++ programming with MySQL
Posted by: Michael Griffith
Date: August 25, 2010 09:34AM

I'm not new to C++, somewhat new to MySQL. But, I was writing a BASH script on Linux and need to use the BASH script to execute a MySQL query. Obviously, there is no native support for doing this in BASH and I'd like to avoid downloading a program that will take can send the output for me through pipes. Instead, I'm going to write a short C++ program that will ask the user the information for the three databases that need to be used/created. I want C++ to take in the user's information about Username, Password, and the three database names; then I want it to logon to the MySQL and execute the query from a source file (file.sql). I know MySQL syntax (somewhat), and do not need to select any information from the databases, just execute the query source file(s). Can anyone direct me in the right direction to program C++ and MySQL together?

Although, this doesn't belong here, does anyone know how I can use a C++ program to execute a BASH script?
Thanks in advance anybody!

Options: ReplyQuote


Subject
Views
Written By
Posted
C++ programming with MySQL
898
August 25, 2010 09:34AM
369
August 25, 2010 11:58AM
345
August 25, 2010 12:18PM
485
August 25, 2010 06:16PM
367
August 25, 2010 09:08PM
450
August 26, 2010 08:04AM
450
August 26, 2010 08:52AM
491
September 01, 2010 04:39PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.