[MySQL] how to install and deploy the source code SourceCode of MySQL5.5
Install CMAKE
Wget http://www.cmake.org/files/v2.8/cmake-VERSION.tar.gz
# Tar zxvf cmake-VERSION.tar.gz
# Cd cmake-VERSION
#./Bootstrap
# Make
# Make install
Install mysql Source Code 1. Compile the source code
# Tar zxvf mysql-VERSION.tar.gz
# Cd mysql-VERSION
# Cmake.
# Make
# Make install
2. Add a user
# Groupadd-g 1000 mysql
# Useradd-u 10001-g mysql
3. Execute mysql internal Installation
# Chown-R mysql: mysql/usr/local/mysql
# Cd/usr/local/mysql
# Scripts/mysql_install_db -- user = mysql
Note: The mysql_install_db script uses './bin' to replace the path/usr/local/mysql/bin. Therefore, the current path must be/usr/local/mysql.
4. Start mysql
Create a parameter file:
# Cp support-files/my-medium.cnf/etc/my. cnf
Start Database
# Cd/usr/local/mysql
# Support-files/mysql. server start
Or you can use mysql_safe to start the database.
# Bin/mysqld_safe -- user = mysql