Description:
When I am writing this article to install MySQL, although MySQL version 8.0.17 has been released to, but for the industry, the main version is still version 5.7. Currently installed by default in the Linux environment, most have been installed by default to version 8, so I deliberately write an installed version 5.7 of the record, and I used to help novice friends later use.
- surroundings:
- Operating System: centos 7.7
MySQL:5.7
Step 1: Configure yum source
- Find the source rpm yum install package https://dev.mysql.com/downloads/repo/yum/
[root@qinshengfei ~]# wget https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
- View yum source files downloaded
Step 2: Install mysql source
[root@qinshengfei ~]#yum localinstall mysql57-community-release-el7-11.noarch.rpm
Step 3: Install MySQL
[root@qinshengfei ~]# yum install -y mysql-community-server
Step Four: Start MySQL
[root@qinshengfei ~]# service mysqld start
- View MySQL running state
Step Five: Sign mysql
- Mysql After installation is complete, the resulting file in the default password /var/log/mysqld.log. Use the grep command to find the log in password
[root@qinshengfei ~]# grep 'temporary password' /var/log/mysqld.log
- Use your new password MySQL
[root@qinshengfei ~]# mysql -u root -p
Step Six: Change Password:
- Set a complicated password
mysql>ALTER USER 'root'@'localhost' IDENTIFIED BY 'QWErt123!@#';
Step Seven: Turn root remote login account:
mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'QWErt123!@#' WITH GRANT OPTION;
to sum up:
- MySQL has a password policies, password will be modified when the password verification is required: uppercase and lowercase letters, numbers and special characters, and the length is not less than 8.
- If Ali is the cloud server 3306 is off by default, in the case of the opening of the root account remote login, as well as remote login can not.
- PS: After I finished the installation guide articles published related articles will be released in spring boot, spring cloud, redis, welcomed the attention, to discuss technical
Welcome to the number of public attention: a yard where farmers