Premise
Version mysql-5.5
Platform centos6.x
Add user
Useradd-m-s/sbin/nologin MySQL
Install the required packages
Yum-y Install compat-libstdc++-33.x86_64 libaio.x86_64
Installation
Tar xzvf mysql-5.5.43-linux2.6-x86_64.tar.gz
Mv-f mysql-5.5.43-linux2.6-x86_64/storage/server/
Ln-sf/storage/server/mysql-5.5.43-linux2.6-x86_64/storage/server/mysql
Chown-r mysql:mysql/storage/server/mysql/
# New MySQL Data directory
Mkdir-p/storage/data/mysql
Chown-r Mysql:mysql/storage/data/mysql
Initialization
scripts/mysql_install_db--user=mysql--basedir=/storage/server/mysql--datadir=/storage/data/mysql
Modifying a configuration file
Vim/etc/my.cnf
[Mysqld]port 3306 Socket =/tmp/=/m2odata/server/=/m2odata/data/mysql
Boot (recommended with Mysqld_safe)
/m2odata/server/mysql/bin/mysqld_safe &
Security settings (make some security settings for the database based on script prompts)
/storage/server/mysql/bin/mysql_secure_installation
Mysql binary Installation