源碼安裝mysql5.5

來源:互聯網
上載者:User

要先安裝CMAKE
yum install cmake -y
或者
wget http://www.cmake.org/files/v2.8/cmake-2.8.11.2.tar.gz
下載後解壓安裝,我用的是YUM方式

下載MYSQL5.5
wget http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.34.tar.gz/from/http://cdn.mysql.com/
解壓
tar -xzf mysql-5.5.34.tar.gz
cd mysql-5.5.34

cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/data/mysql/data -DSYSCONFDIR=/etc -DMYSQL_UNIX_ADDR=/data/mysql/mysqld.sock
make
make install


cd /usr/local/mysql
cp support-files/my-large.cnf /etc/my.cnf
cp support-files/mysql.server /etc/init.d/mysqld
chmod 755 /etc/init.d/mysqld
mkdir -p /data/mysql/data
scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/data/mysql/data
chown -R mysql:mysql /data/mysql


service mysqld start
啟動OK

本文出自 “石頭洞” 部落格,謝絕轉載!

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.