How to install My sql 5.1 from tarball on Linux (generic)
Download mysql 5.1 package (the tarball) from here - http://dev.mysql.com/downloads/mirror.php?id=414182
Now do follow sudo apt-get purge mysql-server mysql-common
#### this will purge any privious or other mysql installation#####
Now untar the archive in src directory
sudo tar -xvzf mysql-5.1.71.tar.gz --directory=/usr/local/src
cd /usr/local/src/mysql-5.1.71/
sudo groupadd mysql
sudo useradd -g mysql mysql
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 mkdir /usr/local/mysql/var
Now install checkinstall package for checking your make
sudo apt-get install checkinstall
now check your make as bellow-
sudo checkinstall
default will prompt to yes --enter
now at the >> prompt write mysql-server 5.1.71 press enter
again press enter this will show you the status.
now dpkg -l | grep -i mysql
sudo cp support-files/my-medium.cnf /etc/my.cnf
cd /usr/local/mysql/
sudo chown -R root:mysql .
sudo chown -R mysql var
sudo bin/mysql --version
sudo bin/mysql_install_db --user=mysql
sudo bin/mysqld_safe user=mysql &
sudo /usr/local/mysql/libexec/mysqld &
/usr/local/mysql/bin/mysqladmin -u root password 'new-password'
done
Now do follow sudo apt-get purge mysql-server mysql-common
#### this will purge any privious or other mysql installation#####
Now untar the archive in src directory
sudo tar -xvzf mysql-5.1.71.tar.gz --directory=/usr/local/src
cd /usr/local/src/mysql-5.1.71/
sudo groupadd mysql
sudo useradd -g mysql mysql
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 mkdir /usr/local/mysql/var
Now install checkinstall package for checking your make
sudo apt-get install checkinstall
now check your make as bellow-
sudo checkinstall
default will prompt to yes --enter
now at the >> prompt write mysql-server 5.1.71 press enter
again press enter this will show you the status.
now dpkg -l | grep -i mysql
sudo cp support-files/my-medium.cnf /etc/my.cnf
cd /usr/local/mysql/
sudo chown -R root:mysql .
sudo chown -R mysql var
sudo bin/mysql --version
sudo bin/mysql_install_db --user=mysql
sudo bin/mysqld_safe user=mysql &
sudo /usr/local/mysql/libexec/mysqld &
/usr/local/mysql/bin/mysqladmin -u root password 'new-password'
done
Comments
Post a Comment