Find the answer to your Linux question:
Results 1 to 10 of 10
install of mysql-connector-c++-1.0.5-linux-glibc2.3-x86-32bit how to use readme file and make install...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2011
    Posts
    7

    install mysql c++ driver in open suse linux


    install of mysql-connector-c++-1.0.5-linux-glibc2.3-x86-32bit

    how to use readme file
    and make install

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Aren't those files provided in a package in the OpenSUSE repos?

    For example, I see libmysqlcppconn1-1.0.5-9.2.i586.rpm listed in the i586 repo for 11.4 here:

    Index of /distribution/11.4/repo/oss/suse/i586

    EDIT: The file you downloaded (I presume from here) contains the binary files already - e.g. libmysqlcppconn.so.1.0.5, so you do not need to make them)
    Last edited by atreyu; 11-02-2011 at 02:44 PM. Reason: and another thing

  3. #3
    Just Joined!
    Join Date
    Nov 2011
    Posts
    7
    hi thanx for u reply .. i am basically new to unix..
    and i was told to work on it
    i was told to read that readme file..
    install it
    i cannot understand any instruction in the readme file
    here is the commands i gave in kernel
    guido@mapped-129-120-38-131:~/Downloads> cd mysql-connector-c++-1.0.5-linux-glibc2.3-x86-32bit
    guido@mapped-129-120-38-131:~/Downloads/mysql-connector-c++-1.0.5-linux-glibc2.3-x86-32bit> vi README
    guido@mapped-129-120-38-131:~/Downloads/mysql-connector-c++-1.0.5-linux-glibc2.3-x86-32bit> cmake
    cmake version 2.8.3
    Usage

    cmake [options] <path-to-source>
    cmake [options] <path-to-existing-build>

    guido@mapped-129-120-38-131:~/Downloads/mysql-connector-c++-1.0.5-linux-glibc2.3-x86-32bit> ./configure
    bash: ./configure: No such file or directory

    I saw from linux forms that i have to do ./configure
    but i am getting the above one
    can u please figure it out for me

  4. #4
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    You may have been told to install that package, but I'm just saying you may not need to if you can install the same software via the system's package manager. It is much better to do things this way, if you can. I think Suse uses Yast, but I think that is a frontend for rpm. Go here to read up on it.

    So if you can get away with fulfilling your requirement by installing the package that way, then great. If you truly need to install it via the downloaded package for some reason then you need to understand that (according to the README in that tarball):

    1. the binary files are already there for the tarball you downloaded, you don't need to make them. they are in these directories, inside the tarball:
    Code:
    ./lib
    ./include
    You can probably copy them to /usr/local/lib and /usr/local/include and be done.

    2. if you do need/want to recompile, then you need to download the source tarball. you are trying to compile using the binary tarball. The source tarball is named mysql-connector-c++-1.0.5.tar.gz and is here:

    Index of /MySQL/Downloads/Connector-C++

    Also, as is stated in the README, you have to pass a directory to cmake, e.g. cmake .

  5. #5
    Just Joined!
    Join Date
    Nov 2011
    Posts
    7
    great i installed it through yast
    but how can i know that it is working
    should i have to verify by writing a C++ program and include mysql database in it

    and how can i know that mysql server is on

  6. #6
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    but how can i know that it is working
    should i have to verify by writing a C++ program and include mysql database in it
    Yes, that's a good start. Give it a go, and if you have troubles, just post a thread here and a C expert will help you out.

    and how can i know that mysql server is on
    Just try to connect to it by running the MySQL client from the terminal, e.g.:
    Code:
    mysql
    you can specify the user with -u and -p to prompt for a password, and -h to prompt for connecting to a server on another host. If it works, you'll get a prompt like:

    Code:
    mysql>
    If you get a can't connect to local MySQL server type error, then try starting it up manually, e.g.:

    Code:
    /etc/init.d/mysqld start
    That command varies from distro to distro but I think that'll work for you.

    Other ways you can use to check if it is running:

    Code:
    /etc/init.d/mysqld status
    or grep for it with:
    Code:
    ps auxww|grep mysqld
    Also, not sure if Suse uses chkconfig, but if it does, you can use it to configure the MySQL daemon to autostart (when the system boots up) with:
    Code:
    chkconfig mysql on

  7. #7
    Just Joined!
    Join Date
    Nov 2011
    Posts
    7
    i can do it manually

    guido@mapped-129-120-38-131:~> cd /etc/init.d
    guido@mapped-129-120-38-131:/etc/init.d> su
    Password:
    mapped-129-120-38-131:/etc/init.d # mysql
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 1
    Server version: 5.1.53-log SUSE MySQL RPM

    Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
    This software comes with ABSOLUTELY NO WARRANTY. This is free software,
    and you are welcome to modify and redistribute it under the GPL v2 license

    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

    mysql>


    but how can make it automatic

  8. #8
    Just Joined!
    Join Date
    Nov 2011
    Posts
    7
    when i run the code chkconfig mysql on
    i got like this:
    mapped-129-120-38-131:/home/guido # chkconfig mysql on
    insserv: script mysql: service mysql already provided!
    insserv: exiting now!
    /sbin/insserv failed, exit code 1

  9. #9
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    I'm not familiar with insserv, but it must be some sort of Suse replacement for chkconfig. But it seems that it has already got MySQL configured for auto-boot. I guess you can simply reboot (if it is not a production machine) and see if MySQL is running. But my guess is, it is.

  10. #10
    Just Joined!
    Join Date
    Nov 2011
    Posts
    7
    I use linux and gnu compiler and i want to write a program to call database in mysql with c++ programming

    while connecting mysql to server
    in my program
    I am getting errors like
    ction `main':
    data.cpp.text+0x12): undefined reference to `mysql_init'
    data.cpp.text+0x8e): undefined reference to `mysql_real_connect'
    data.cpp.text+0xa3): undefined reference to `mysql_error'
    data.cpp.text+0xb1): undefined reference to `mysql_errno'
    collect2: ld returned 1 exit status

    what header files i should include to make mysql server connected with c++

    can u please help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •