Skip to content

Instantly share code, notes, and snippets.

@zhfnjust
Created March 9, 2014 12:13
Show Gist options
  • Save zhfnjust/9446895 to your computer and use it in GitHub Desktop.
Save zhfnjust/9446895 to your computer and use it in GitHub Desktop.
install mysql from source
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install build-essential checkinstall libncurses5-dev curl
curl --o mysql-4.1.24.tar.gz http://mirror.provenscaling.com/mysql/community/source/4.1/mysql-4.1.24.tar.gz
sudo tar -xvzf mysql-4.1.24.tar.gz --directory=/usr/local/src
cd /usr/local/src/mysql-4.1.24/
sudo groupadd mysql
sudo useradd -g mysql mysql
sudo apt-get install
sudo ./configure --prefix=/usr/local/mysql
sudo make
sudo mkdir /usr/local/mysql
sudo mkdir /usr/local/mysql/include
sudo mkdir /usr/local/mysql/include/mysql
sudo mkdir /usr/local/mysql/lib
sudo mkdir /usr/local/mysql/lib/mysql
sudo mkdir /usr/local/mysql/share
sudo mkdir /usr/local/mysql/man
sudo mkdir /usr/local/mysql/mysql-test
sudo checkinstall
y
mysql-server 4.1.24
dpkg -l | grep -i mysql
sudo cp support-files/my-medium.cnf /etc/my.cnf
cd /usr/local/mysql/
pwd
bin/mysql_install_db --user=mysql
sudo chown -R root .
sudo chown -R mysql var
sudo chgrp -R mysql .
bin/mysql --version
bin/mysql_install_db --user=mysql
sudo bin/mysqld_safe user=mysql &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment