mysql 5.5.15 的安裝

在centos6.0上安裝mysql5.5.15

先安裝cmake


yum -y install gcc gcc-c++

tar zxvf /home/aa/cmake-2.8.5.tar.gz -C /usr/src/

cd /usr/src/cmake-2.8.5/

./configure

make && make install


安裝mysql 5.5.15

useradd -M -s /sbin/nologin mysql

yum -y install ncurses ncurses-devel bison

tar zxvf /home/aa/mysql-5.5.15.tar.gz -C /usr/src

cd /usr/src/mysql-5.5.15/

cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL-DATADIR=/usr/local/mysql/data/

make && make install

cd /usr/local/mysql/

cp support-files/my-medium.cnf /etc/my.cnf

chown -R root:mysql /usr/local/mysql/
chown -R mysql /usr/local/mysql/data/

scripts/mysql_install_db –user=mysql &

bin/mysqld_safe –user=mysql & 啟動mysql

cp support-files/mysql.server /etc/init.d/mysqld

chkconfig –add mysqld

export PATH=$PATH:/usr/local/mysql/bin/
echo "PATH=$PATH:/usr/local/mysql/bin/" >> /etc/profile

 

本文出自 “我的青春我做主” 博客

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。