Environment: Centos6.7,minimal installation.
Prerequisite: Installed the compilation environment, installed Apache.
1, download decompression
# wget http://archive.mariadb.org//mariadb-5.5.44/bintar-linux-x86/mariadb-5.5.44-linux-i686.tar.gz
# tar XF Mariadb-5.5.44-linux-x86_64.tar.gz-c/usr/local
# cd/usr/local
2, create the Data directory
3. Add Users and Groups
# useradd-r MySQL
#chown-R mysql.mysql/mydata/data
4. Add Connection File
# cd/usr/local
# LN-SV Mariadb-5.5.44-linux-x86_64/mysql
5. Change file owner and group
# cd/usr/local/mysql
# chown-r root.mysql./*
6. Initializing the database
[root@localhost mysql]# scripts/mysql_install_db --datadir=/mydata/data/ --user=mysql
Note: When initializing here, the following data directory and MY.CNF directory must remain, otherwise the MYSQLD service will not start.
7, set the configuration file
# mkdir/etc/mysql #
CP support-files/my-large.cnf/etc/mysql/my.cnf/
# VIM/ETC/MYSQL/MY.CNF
8. Provide service script
# cp Support-files/mysql.server/etc/rc.d/init.d/mysqld
# chmod +x/etc/rc.d/init.d/mysqld
# chkconfig--add Mysqld
# service mysqld start
9, testing
# ss -tnl
10. Import Binary Execution path
# vim/etc/profile.d/mysqld.sh
export path=/usr/local/mysql/bin: $PATH
#/etc/profile.d/mysqld.sh