Connection

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

  1. johnliew

    johnliew New Member

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    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

    Messages:
    1,260
    Likes Received:
    430
    Trophy Points:
    83
  3. nixsavy

    nixsavy Member

    Messages:
    65
    Likes Received:
    17
    Trophy Points:
    8
    Try to install using yum
  4. DaSt1986

    DaSt1986 New Member

    Messages:
    15
    Likes Received:
    2
    Trophy Points:
    3
    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