First, download the MySQL compression pack on Oracle's website
Download this tar package and upload it to the server via FTP, unzip it to the corresponding path by Xshell, check if the system has MARIADB installed, because it is the branch of MySQL, the two will have conflict with the installation of MySQL.
// check command Yum List installed | grep mariadb // Uninstall Command yum-y remove mariadb-libs.x86_64
Create a data directory for storing database tables
mkdir data
Install MySQL
./mysqld--initialize--user=mysql--datadir=/usr/local/mysql-5.7. /data--basedir=/usr/local/mysql-5.7. -
After installing the initial password as above, need to record, for a MySQL login:. hoxyhvru3um
Enable security features to generate digital certificates
./mysql_ssl_rsa_setup--datadir=/usr/local/mysql-5.7. /data
Data certificate file
Assigning permissions to the entire MySQL installation directory
Chown-r mysql:mysql/usr/local/mysql-5. 7. /
Start MySQL
// & indicates booting from the background ./mysqld_safe &
// view process ps-ef|grep MySQL
Using MySQL
// executes in the bin directory ./mysql-uroot-P// paste password after execution
You need to change your password before entering
// Modify Password Statements ' Root '@'localhost'123456';
Before granting remote access, permissions on the native installation of MySQL, only native access to this MySQL, can be accessed by granting permissions to any server, or you can specify a server to access
Grant all privileges on * * to [email protected]'%'123456' ; // WHERE * * The first * represents the database name, the second * represents all database tables // [email protected] '% ' root indicates the database user name,% is the IP address, you can also specify the specific IP address: [email protected] ' 135.149.96.53 '
Successful authorization via NAVICAT connection, successful connection
Quit MySQL
Turn off MySQL service
// turn off the MySQL service ./mysqladmin-uroot-p shutdown
The MySQL service is down.
Linux system installation MySQL