Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Build MySQL 5.1 on Ubuntu 12.04 and later (5.1 is not available in Ubuntu repo)
#!/bin/bash
set -e
cd ~/
wget http://downloads.mysql.com/archives/mysql-5.1/mysql-5.1.65.tar.gz
tar -zxf mysql-5.1.65.tar.gz
cd mysql-5.1.65
./configure '--prefix=/usr' '--exec-prefix=/usr' '--libexecdir=/usr/sbin' '--datadir=/usr/share' '--localstatedir=/var/lib/mysql' '--includedir=/usr/include' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-system-type=debian-linux-gnu' '--enable-shared' '--enable-static' '--enable-thread-safe-client' '--enable-assembler' '--enable-local-infile' '--with-fast-mutexes' '--with-big-tables' '--with-unix-socket-path=/var/run/mysqld/mysqld.sock' '--with-mysqld-user=mysql' '--with-libwrap' '--without-readline' '--with-ssl' '--without-docs' '--with-extra-charsets=all' '--with-plugins=max' '--with-embedded-server' '--with-embedded-privilege-control'
make
sudo make install
@lkimme

This comment has been minimized.

Copy link

@lkimme lkimme commented Jul 15, 2014

Hi,
I see that a lot of people have had success with this script. For me, it didn't create a makefile. Any ideas?
Thanks for your help,
Louis

@Revlin

This comment has been minimized.

Copy link

@Revlin Revlin commented Feb 5, 2015

When running ./cofingure '--...' I got this error:

configure: error: No curses/termcap library found

This indicates missing include files for the ncurses library. I was missing a few other dev libraries, which I resolved by:

sudo apt-get install libncurses5-dev libedit-dev libreadline-dev  libssl-dev

I also had to add '--with-readline' as another option to ./configure

@pbraconnot

This comment has been minimized.

Copy link

@pbraconnot pbraconnot commented Mar 31, 2016

Revlin comment has helped me, I will add that the script already has '--without-readline' and I had to change to '--with-readline'.
Also in a new environment I had to install "make" with this command:
apt-get install build-essential

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment