Download to official website
Mysql-5.6.12-linux-glibc2.5-x86_64.tar.gz
Add MySQL group and MySQL user to set MySQL installation directory file owner and owning group
Groupadd MySQL
Useradd-r-G MySQL MySQL
Extract the binaries to the specified installation directory, which we specify as/usr/local
cd/usr/local/
Tar zxvf mysql-5.6.12-linux-glibc2.5-x86_64.tar.gz
The name is too long to establish a soft connection
Ln-s mysql-5.6.12-linux-glibc2.5-x86_64 MySQL
Go to the MySQL folder, the directory where MySQL resides, and change the groups and users that belong to it.
CD MySQL
Chown-r MySQL.
Chgrp-r MySQL
Execute mysql_install_db Script
scripts/mysql_install_db--user=mysql
All files in the mysql/directory except the data/directory are changed back to the root user, and the MySQL user only needs to be the owner of all files in the mysql/data/directory.
Chown-r Root.
Chown-r MySQL Data
Copying a configuration file
CP SUPPORT-FILES/MY-MEDIUM.CNF/ETC/MY.CNF
Adding the Mysqld service to the power-on self-boot entry
CP Support-files/mysql.server/etc/init.d/mysqld
Add the Mysqld service to the self-starting service item by using the Chkconfig command.
Chkconfig--add mysqld
To see if a success was added
Chkconfig--list mysqld
Start manually.
Service mysqld Start
Problems with remote connection unreachable
Go to the Bin directory:
./mysql-u Root-p
Enter password
Then execute: Use MySQL
Authorization: Grant all privileges on * * to ' root ' @ ' 36.34.90.248 ' identified by ' MyPassword ' with GRANT OPTION;
Install MySQL database under Linux