1. Establish operating system users and groups
[[email protected] ~]# Groupadd MySQL
[[email protected] ~]# useradd-g MySQL MySQL
2. Unzip the installation file
[Email protected] ~]# cd/usr/local/
[[email protected] local]# mkdir MySQL
[Email protected] mysql]# tar-zxvf/mnt/mysql-5.5.53-linux2.6-x86_64.tar.gz
[Email protected] mysql]# ln-s mysql-5.5.53-linux2.6-x86_64/mysql
3, initialize the MySQL database (in the data directory to create the system database and system tables,--user that these databases and tables owner is this user):
[Email protected] data]# cd/usr/local/mysql/mysql/
[Email protected] mysql]# scripts/mysql_install_db--user=mysql
4. Modify MySQL installation directory permissions:
[Email protected] mysql]# pwd
/usr/local/mysql
[[email protected] mysql]# chown-r mysql:mysql MySQL
5. Start the MySQL database:
[Email protected] mysql]# Bin/mysqld_safe--user=mysql &
[[email protected] ~]# ps-ef|grep MySQL
Root 26716 26537 0 11:45 pts/2 00:00:00/bin/sh bin/mysqld_safe--user=mysql
MySQL 26797 26716 0 11:45 pts/2 00:00:00/usr/local/mysql/mysql/bin/mysqld--basedir=/usr/local/mysql/mysql--datad Ir=/usr/local/mysql/mysql/data--plugin-dir=/usr/local/mysql/mysql/lib/plugin--user=mysql--log-error=/usr/local /mysql/mysql/data/faspdev.err--pid-file=/usr/local/mysql/mysql/data/faspdev.pid
6. Access MySQL database:
Binary installation method for MySQL on Linux