Connection

Discussion in 'Command Line' started by johnliew, Jul 11, 2013.

  1. johnliew

    johnliew New Member

    Joined:
    Jul 11, 2013
    Messages:
    1
    Likes Received:
    0
    Hi all,


    I am newbie in linux. Currently i am having a problem in connecting mysql and c++ in linux. When i try to run my script in terminal i have a problem as below,

    test.cpp:3:19: fatal error: mysql.h: No such file or directory
    compilation terminated.
    To overcome this problem, i tried to install the 'mysql-connector-cpp' package. However, i do have another problem which is,
    'mysql-connector-cpp' not found in package names. Trying capabilities.
    No provider of 'mysql-connector-cpp' found.
    So is there anyway to overcome this problem or anyway to get the "mysql.h' ?Anyone can assist me about this?
    Best Regards.
     
  2. ryanvade

    ryanvade Administrator Staff Member Staff Writer

    Joined:
    Aug 4, 2012
    Messages:
    1,863
    Likes Received:
    655
  3. nixsavy

    nixsavy Member

    Joined:
    May 21, 2013
    Messages:
    65
    Likes Received:
    18
    Try to install using yum
     
  4. DaSt1986

    DaSt1986 New Member

    Joined:
    Jul 12, 2013
    Messages:
    15
    Likes Received:
    2
    On Debian-based systems I think you'll have to install the library libmysqlcppconn5:
    Code:
    $ sudo apt-get update
    $ sudo apt-get install libmysqlcppconn5
    You can find this by using apt-cache search:
    Code:
    $ apt-cache search mysql | grep cpp
     

Share This Page