How to Install MySQL 5.0.77 on Debian Lenny

First we have to install the Normal Mysql packages in Debian Lenny

apt-get update
# apt-get install -y apache2

# MySql 5 and PHP 5
apt-get install -y mysql-server mysql-client libmysqlclient15-dev
apt-get install -y php5 libapache2-mod-php5 php5-mysql php5-gd php5-cli

# Usefull Utilities
apt-get install -y apg curl biabam bzip2 screen subversion
apt-get install -y ngrep expect

# Asterisk
apt-get install -y libncurses5-dev libssl-dev bison make gcc
apt-get install -y libdbd-mysql-perl sudo g++

How to install MySQL 5.0.77

mkdir -p /usr/local
cd /usr/local
# See http://dev.mysql.com/downloads/mysql/5.0.html for exact download location
# It may change in the future.
wget http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.77-linux-i686-icc-glibc23.tar.gz/from/http://ftp.sunet.se/pub/unix/databases/relational/mysql/

tar zxvf mysql-5.0.77-linux-i686-icc-glibc23.tar.gz

# The mysql group and user allready exist if you have installed MySQL in Debian Lenny
# groupadd mysql
# useradd -g mysql mysql
ln -s mysql-5.0.77-linux-i686-icc-glibc23 mysql
cd mysql

#Stop Old Mysql
/etc/init.d/mysql stop
cd /usr/local/mysql/bin
cp mysqld /usr/sbin/
cp mysqlmanager /usr/sbin/
cp * /usr/bin

# Ensure MySQL starts at reboot and enable /etc/init.d/mysql start or stop
cd /usr/local/mysql/support-files
cp mysql.server /etc/init.d/mysql

# Create the new data folder
cd /usr/local/mysql
scripts/mysql_install_db –user=mysql

chown -R root .
chown -R mysql data
chgrp -R mysql .

Copy the correct my.cnf to the /etc/my.cnf for your system.
cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf

IMPORTANT: You have to change the following in the file:
/etc/my.cnf

nano /etc/my.cnf

[client]
socket = /var/lib/mysql/mysql.sock

[mysqld]
socket = /var/lib/mysql/mysql.sock

Debian Lenny keeps MySQL data in:
/var/lib/mysql
Your MySQL data will now be in:
/usr/local/mysql/data

#How to Start MySQL
/etc/init.d/mysql start

Explore posts in the same categories: Ubuntu & Debian, Ubuntu/Debian

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s


%d blogger menyukai ini: