1. Download the MySQL installation package (there is a trick here. Maybe when I write this, the version is still the old version you see. If it is not 8.0, you can download the new version according to this) First enter the official website Combining the two together will give you the latest version. so [root@h1 ~]# rpm -ivh http://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm 2. Install MySQL [root@localhost ~]# yum install -y mysql-server or [root@localhost ~]# yum install mysql-community-server If the following is displayed, the installation is successful Complete! 3. Set up mysql Set up Mysql startup [root@localhost ~]# systemctl enable mysqld.service Check whether the startup autostart is installed [root@localhost ~]# systemctl list-unit-files | grep mysqld If the following content is displayed, the automatic startup installation has been completed mysqld.service enabled Set up service [root@localhost ~]# systemctl start mysqld.service A brief note is needed here: the password modification method of MySQL 8.0 version is different from that of previous versions 4. Log in to modify the mysql password View the default password of mysql [root@localhost ~]# grep 'temporary password' /var/log/mysqld.log Log in to MySQL for the first time and enter the account and default password [root@localhost ~]# mysql -uroot -p Modify current password #MySQL8.0 requires a combination of uppercase and lowercase letters, numbers, and special characters to modify the passwordmysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!'; Official password modification instructions 5. The command is executed immediately and takes effect mysql>flush privileges; Supplement: External network/client access issues, such as navicat connection Solution: Log in to MySQL and modify the host of the user logged in in the user table #Remotely set mysql> use mysql; mysql> update user set host='%' where user='root'; #Authorize the user name's permissions and grant any host the permission to access data mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION; mysql> FLUSH PRIVILEGES; Then after everything is ok, error 2059 appears again, because the security port is not open After the mysql login user password is set, you need to develop a security group port, and it seems that the above is not mysql8.0 version, because the encryption method of version 8.0 has changed. The encryption rule after mysql8 is caching_sha2_password, so we need to change the encryption rule of mysql user login to mysql_native_password, and you need to turn off the firewall, and then set a security port (note that since the user was changed before, here @"%") mysql> ALTER USER 'root'@'%' IDENTIFIED BY 'Root!!2018' PASSWORD EXPIRE NEVER; Query OK, 0 rows affected (0.03 sec) mysql> ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'Root!!2018'; Query OK, 0 rows affected (0.01 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) 1. 2. Disable startup: In addition, you need to add a new rule to open port 3306 in the Alibaba Cloud console firewall. Then connect again, ok Supplement : Database related operations #Start mysql systemctl start mysqld.service #End systemctl stop mysqld.service #Restart systemctl restart mysqld.service #Start automatically at boot time systemctl enable mysqld.service This is the end of this article about the steps to install MySQL 8.0.13 in Alibaba Cloud centos7. For more information about installing MySQL 8.0.13 in centos7, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
>>: Why I recommend Nginx as a backend server proxy (reason analysis)
Table of contents 1. isPrototypeOf() Example 1, O...
Core SQL statements MySQL query statement that do...
Table of contents 1. Conditional access attribute...
Why should we read the log? For example, if the c...
The explain command is the primary way to see how...
Table of contents 1. Introduction 1.1 Principle 1...
This article shares the specific code of Vue to s...
<br />This tag can display a horizontal line...
Isolation of process address spaces is a notable ...
Problem Description The button style is icon + te...
First, I will give you the VMware 14 activation c...
To obtain the calculated style in a CSS element (t...
p>Manually start in "Services" and i...
1. Docker Network Mode When docker run creates a ...
This article shares the specific code of Javascri...