Download MySQL installation package
https://dev.mysql.com/downloads/mysql/
uploaded to the server
detects whether the installation mariadb (when installing MySQL and mariadb file will cause conflict with the installation is unsuccessful)
Uninstall
force uninstall
install some dependencies (find the corresponding Rpm package)
autoconf
perl
Use the rmp command to install (the local server has no external network)
rpm -ivh MySQL-client-5.6.45-1.el6.x86_64.rpm
rpm -ivh MySQL-server-5.6.45-1.el6.x86_64.rpm After the
installation is successful Will display, the default password file and configuration file path
Password: cat /root/.mysql_secret
You can also view the installation status through the command rpm -qa | grep -i mysql
start service service mysql start
log in to MySQL: mysql -uroot -p
modify the account password
set password for root@localhost = password('root');
after the installation is successful, the local The solution to the long connection loading time:
modify the configuration file and add
[mysqld]
skip-name-resolve at the end
vim /usr/my.cnf