Author Topic: Configure CB to connect to MySql in Ubuntu, using MySql++  (Read 8289 times)

ArcticFox69

  • Guest
Configure CB to connect to MySql in Ubuntu, using MySql++
« 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

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6675
    • My Best Post
Re: Configure CB to connect to MySql in Ubuntu, using MySql++
« Reply #1 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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

ArcticFox69

  • Guest
Re: Configure CB to connect to MySql in Ubuntu, using MySql++
« Reply #2 on: April 26, 2010, 06:07:33 pm »
Oh, pardon me, I thought this was a Code::Block website.  Te Hee   :?

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Configure CB to connect to MySql in Ubuntu, using MySql++
« Reply #3 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).

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.

ArcticFox69

  • Guest
Re: Configure CB to connect to MySql in Ubuntu, using MySql++
« Reply #4 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?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6675
    • My Best Post
Re: Configure CB to connect to MySql in Ubuntu, using MySql++
« Reply #5 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.
« Last Edit: April 30, 2010, 06:01:06 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline ArcticFox69

  • Single posting newcomer
  • *
  • Posts: 3
Re: Configure CB to connect to MySql in Ubuntu, using MySql++
« Reply #6 on: May 04, 2010, 04:49:49 pm »
In other words, you don't know   :twisted:

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12123
    • Travis build status
Re: Configure CB to connect to MySql in Ubuntu, using MySql++
« Reply #7 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
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ArcticFox69

  • Single posting newcomer
  • *
  • Posts: 3
Re: Configure CB to connect to MySql in Ubuntu, using MySql++
« Reply #8 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



Offline stahta01

  • Lives here!
  • ****
  • Posts: 6675
    • My Best Post
Re: Configure CB to connect to MySql in Ubuntu, using MySql++
« Reply #9 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.

« Last Edit: May 04, 2010, 07:01:57 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline ArcticFox69

  • Single posting newcomer
  • *
  • Posts: 3
Re: Configure CB to connect to MySql in Ubuntu, using MySql++
« Reply #10 on: May 05, 2010, 06:03:38 pm »
Thank you for the advice.  I found the answer I needed.