jump to navigation

Mysql Build Issues

Hi there!!! Since you have arrived at this page we assume you are having the mission of building mysql from source (for any reason whatever) . Did you start the build process??? Did you come across a horde of errors (I had plenty of those initially)??? Well, do not worry we have gone through this a number of times and here is a list of errors that we found in our experience with installing from source on Windows as well as Ubuntu. We actually came across a lot more errors than what is printed on this page. However, we could only capture the errors given below.

In case you are installing mysql from source on Windows or Ubuntu then do contact us at abdullah.ak2002@gmail.com or taufiq.mysql@gmail.com  . We are confident that we will be able to help you and we will update your errors and their solutions on this page.

Windows

  1. Use this link,http://forge.mysql.com/wiki/
    Building_MySQL_on_Windows
    as a guide. The most authentic and easy way to getting started on Windows. Should not be a problem at all (though we did have a few but that was before we used this tutorial).

Ubuntu 8.04 (Hardy Heron)

  1. First off install m4,autoconf,automake,libtool & [bison]
    1. Easy way open Synaptic Manager by clicking on System->Administration->Synaptic Package Manager.
      1. Press Ctrl+f and type in m4 . Click on m4 and mark for installation if not already marked.
      2. Repeat the same procedure as above for autoconf, automake, libtool. If you are going to run a debugger,then bison, gdb and ddd also.
      3. Now click on Apply on Synaptic (you need to have an internet connection).
    2. Or the hard way (IMHO)
      1. First download all the packages you need from GNU at

        http://mirrors.usc.edu/pub/gnu/
      2. cd to the downloaded directory on the terminal.
      3. Now, following commands are to be entered :
      4. $ tar -xzvf m4-1.4.11.tar.gz
      5. $ cd m4-1.4.11
      6. $ sudo ./configure -prefix=/usr
        1. Error obtained
            checking for C compiler default output file name configure: error: C compiler cannot create executables
        2. Reason
            cc is not gcc (v4.2.3)
            Also some libraries have not been installed
        3. Solution
            $cc=gcc
            Install g++ (v4.2.3 — latest) & it’s dependencies from Synaptic
      7. $ sudo make
      8. $ sudo make install
      9. Installation of autoconf,automake,libtool and bison are similar
  2. Following steps are taken from http://forge.mysql.com/wiki/MySQL_Internals_Guided_Tour
  3. cd mysql-version (cd into the source you want to install)
  4. sudo BUILD/compile-pentium-debug –prefix=$HOME/bin-mysql-5.1
    1. Error obtained
        checking for termcap functions library… configure: error: No curses/termcap library found
    2. Reason
      1. No curses/termcap library —
          curses and termcap provide textual user interfaces in a terminal-independent manner.

          You have to have either ncurses or termcap installed for installing mysql.

      2. Check http://en.wikipedia.org/wiki/Ncurses
        for further details.
    3. Solution
        Install libncurses5-dev from Synaptic
        Repeat Step 2.
  5. sudo make
    1. Error obtained
        checking how to run the C++ preprocessor… /lib/cpp
        configure: error: C++ preprocessor “/lib/cpp” fails sanity check
        See `config.log’ for more details.
        make: *** [config.status] Error 1
    2. Reason
        cpp not installed
    3. Solution
        Install latest g++(currently 4.2.3) using Synaptic manager
  6. sudo make install
  7. $HOME/bin-mysql-5.1/bin/mysql_install_db\
    –basedir=$HOME/mysql-bin \
    –datadir=$HOME/mysql-bin/var

    1. Error obtained
        mkdir: cannot create directory `/home/[user_name]/mysql-bin/var’: Permission denied

        chmod: cannot access `/home/[user_name]/mysql-bin/var’: No such file or directory

        Installation of system tables failed! Examine the logs in

        /home/[user_name]/mysql-bin/var for more information.

        Please check all of the above before mailing us! And remember, if

        you do mail us, you MUST use the /home/[user_name]/mysql-bin/scripts/mysqlbug script!

    2. Reason
      1. Problem with Access and modification privileges
      2. Be careful with the access priviliges … It is very tricky & dangerous
        1. For instance, if the bin directory lies inside some user’s home directory then the owner of
          the mysql-bin dir must be that user only and no one else.
    3. Solution
      1. simplest way (if mysql-bin lies in /home/user_x)
        1. $cd /home/user_x
        2. $sudo chown -R [user_x] $HOME/mysql-bin
  8. Congratulations !!! If you have reached this step successfully then you will be having an executable mysql directory on your computer.
    For a comprehensive tutorial,please go through
    http://forge.mysql.com/wiki/MySQL_Internals_Guided_Tour
    .

    If you get any errors then mail me at abdullah.ak2002@gmail.com or taufiq.mysql@gmail.com .

Important Hints :

  1. If you install any package after $./configure then do $make clean and then $./configure again

Comments»

No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: