[筆記] 手動編譯MySQL
- Download mysql source
- tar xvf mysql.tar
- yum -y install cmake
- Compile
Follow guide here: http://forge.mysql.com/wiki/CMake
mkdir bld
cd bld
cmake ..
make
sudo make install
- Set permissions of linux user and group
Follow guide here http://dev.mysql.com/doc/refman/5.6/en/binary-installation.html
groupadd mysql
useradd -r -g mysql mysql
cd /usr/local
tar zxvf /path/to/mysql-VERSION-OS.tar.gz
ln -s full-path-to-mysql-VERSION-OS mysql
cd mysql
chown -R mysql .
chgrp -R mysql .
scripts/mysql_install_db –user=mysql
chown -R root .
chown -R mysql data
- Copy init script and configuration file
cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
chmod +x /etc/init.d/mysqld
chkconfig mysqld on
cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf
- Start the service
service mysqld start
- Run the secure installation
/usr/local/mysql/bin/mysql_secure_installation
This entry was posted in
筆記 and tagged
compile,
Linux,
MySQL,
note. Bookmark the
permalink.