Code::Blocks Forums

User forums => Help => Topic started by: ArcticFox69 on April 23, 2010, 07:34:58 pm

Title: Configure CB to connect to MySql in Ubuntu, using MySql++
Post by: ArcticFox69 on April 23, 2010, 07:34:58 pm
Hi guys,

  I am using Ubuntu and CodeBlocks.   I have installed MySql on my linux machine but can not run even a simple C++ program connecting to a MySql db.  Can anyone please tell me the steps and also if you have some simple code connecting to MySql in Ubuntu or other Linux flavor.  I can not imagine why this seems so difficult. 

Thank you
Title: Re: Configure CB to connect to MySql in Ubuntu, using MySql++
Post by: stahta01 on April 23, 2010, 09:01:50 pm
Hi guys,

  I am using Ubuntu and CodeBlocks.   I have installed MySql on my linux machine but can not run even a simple C++ program connecting to a MySql db.  Can anyone please tell me the steps and also if you have some simple code connecting to MySql in Ubuntu or other Linux flavor.  I can not imagine why this seems so difficult. 

Thank you

I suggest reading and posting in sites that supports MySql under Ubuntu/Linux.
This is NOT such a site.

Tim S.
Title: Re: Configure CB to connect to MySql in Ubuntu, using MySql++
Post by: ArcticFox69 on April 26, 2010, 06:07:33 pm
Oh, pardon me, I thought this was a Code::Block website.  Te Hee   :?
Title: Re: Configure CB to connect to MySql in Ubuntu, using MySql++
Post by: Jenna on April 26, 2010, 06:40:55 pm
Oh, pardon me, I thought this was a Code::Block website.  Te Hee   :?
It is, but it is not a mysql-website.

If you know what settings you need, but don't know where to set them feel free to ask (after searching the forum and reading the manual (http://www.codeblocks.org/user-manual)).

This forum is dedicated to C::B related questions only and not to answer questions to each and any tool kit that can be used with C::B.
Title: Re: Configure CB to connect to MySql in Ubuntu, using MySql++
Post by: ArcticFox69 on April 30, 2010, 01:06:53 am
Ok, I went through the CB manual.  I have been to the Mysql website, I even saw a posting in this forum for cb settings for Mysql.   I can't believe that it can be so difficult to find info on something that seems basic to me.  I am looking to find out how to connect a c++ program using Code::Blocks to MySql.  Gee Wiz in the Microsoft world you just open a component and set a connection and voila! you can connect to sql server.  Comon people.  Please take me from point A to Point Z.  I know nothing.  Total beginner in this.  Anyone?
Title: Re: Configure CB to connect to MySql in Ubuntu, using MySql++
Post by: stahta01 on April 30, 2010, 05:53:26 am
Total beginner in this.  Anyone?

1. Learn what an Compiler does.
2. Learn what an linker does.
3. Learn what an library does.

Code::Blocks is none of the above; it is an IDE-like Tool that can be used with more than one Compiler/Linker. Mainly only supports gdb and cdb as debuggers.

The word "connect" has little valid meaning when applied to Code::Blocks.

What I get is that you wish to use X to connect to an MySQL database.
Where X is an undefined something that is not part of Code::Blocks; but, some reason you think the C::B folks should know how to use MySQL better than the MySQL support groups.

Tim S.
Title: Re: Configure CB to connect to MySql in Ubuntu, using MySql++
Post by: ArcticFox69 on May 04, 2010, 04:49:49 pm
In other words, you don't know   :twisted:
Title: Re: Configure CB to connect to MySql in Ubuntu, using MySql++
Post by: oBFusCATed on May 04, 2010, 05:06:59 pm
Hehe, no we don't know, but we know where to look for:
     http://tangentsoft.net/mysql++/doc/html/userman/index.html
and then ask:
     http://lists.mysql.com/plusplus

Also if you had better(or any) understanding how to use libraries (static or dynamic), you wouldn't have asked this question.

Howto static libs: http://www.linux.org/docs/ldp/howto/Program-Library-HOWTO/static-libraries.html
Howto shared libs: http://www.linux.org/docs/ldp/howto/Program-Library-HOWTO/shared-libraries.html

If you want to earn money doing programming, you should learn to read.
Good luck...   :P
Title: Re: Configure CB to connect to MySql in Ubuntu, using MySql++
Post by: ArcticFox69 on May 04, 2010, 06:25:38 pm
Wouldn't you know it, here is the answer.  It seems to work also.  Wow!!!!! after all of that, the answer was on your own website.  I guess you experts do not know even your own content.  ha ha ha, but thanks for the links, some day I hope to be as great a programmer as you imply that you are.  Cheers.   :wink:


http://forums.codeblocks.org/index.php/topic,9236.0.html


Title: Re: Configure CB to connect to MySql in Ubuntu, using MySql++
Post by: stahta01 on May 04, 2010, 06:54:49 pm
Wouldn't you know it, here is the answer.  It seems to work also.  Wow!!!!! after all of that, the answer was on your own website.  I guess you experts do not know even your own content.  ha ha ha, but thanks for the links, some day I hope to be as great a programmer as you imply that you are.  Cheers.   :wink:


http://forums.codeblocks.org/index.php/topic,9236.0.html


http://dev.mysql.com/doc/refman/5.0/en/mysql-config.html

If you really want to learn how to be a good programmer find a site that teaches programming.
(This Site does NOT teach programming.)
Read the questions and answers for about a month.
Then, answer the simple questions for the newbies.
Once, you can answer the intermediate questions stop answering most simple questions and just answer the intermediate and above questions.

The above assumes you can read and understand other people questions.

Tim S.

Title: Re: Configure CB to connect to MySql in Ubuntu, using MySql++
Post by: ArcticFox69 on May 05, 2010, 06:03:38 pm
Thank you for the advice.  I found the answer I needed.