1. Download the MySQL installation package First click https://dev.mysql.com/downloads/repo/yum/ Find the Linux7 version; Then go to splice URL: So the command:
2. Install MySQL yum install -y mysql-server Or (I only installed the previous one and the next one was automatically installed) yum install mysql-community-server If the following is displayed, the installation is successful 3. Set up MYSQL
If the following content is displayed, the automatic startup installation has been completed
The password modification method of MySQL 8.0 version is different from that of previous versions:
As shown in the picture, my initial password is Log in to MySQL for the first time and enter the account and default password #MySQL8.0 requires a combination of uppercase and lowercase letters, numbers, and special characters to modify the password
It is recommended to use a stronger password here, otherwise there is still a risk! In short, don't set the password too easily! But you still have to remember the password yourself. Note when setting a password: 5. The command is executed immediately and takes effect
Use external network/client access, 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> select host,user from user; ±---------±-----------------+ | host | user | ±---------±-----------------+ | localhost | mysql.infoschema | | localhost | mysql.session | | localhost | mysql.sys | | localhost | root | ±---------±-----------------+ 4 rows in set (0.00 sec) You can see the root user that has been created in the user table. The host field indicates the host you are logging in to. Its value can be either IP or host name. If you want to log in using the local IP, you can change the above Host value to your own IP . Changing the value of the host field to % means that you can log in to the MySQL server as the root user on any client machine. It is recommended to set it to % during development.
Remember to refresh:
Later, modify the security group rules of Alibaba Cloud: In the Alibaba Cloud console firewall, add a new rule to open port 3306: Sequence: Alibaba Cloud Console –> (Recommended) Add cloud server ECS in the common navigation and click —> Then click Instance ----> Click Security Group (create a new security group if there is none) –> Configure rules – then you can add it Now you can connect using navicat. 1. Turn off the firewall:
2. Turn off the startup:
3. Check the firewall status
4. Open the firewall
Database related operations Query the rpm package of mysql
Start mysql
stop
Restart
Automatic startup
Check the status of mysql: (two types)
MySQL security configuration
Security settings include:
This is the end of this article about the detailed tutorial on how to install mysql8.0.22 on Alibaba Cloud CentOS7. For more information about how to install mysql8 on Alibaba Cloud 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:
|
<<: Analysis of Docker's method for creating local images
>>: Docker image management common operation code examples
Introduction Memcached is a distributed caching s...
After the image is built successfully, it can be ...
Problem: The website published through IIS is pla...
This article shares the specific code of js to im...
Includes the process of initializing the root use...
【Problem Analysis】 We can use the chown command. ...
The first time I installed MySQL on my virtual ma...
Because the data binding mechanism of Vue and oth...
Preface add_header is a directive defined in the ...
1. Go to the official website to download the jdk...
Overview Backup is the basis of disaster recovery...
Table of contents react-native project initializa...
Table of contents Web Components customElements O...
Two methods to implement Mysql remote connection ...
This article shares with you the solution to the ...