Installation environment: CentOS7 64-bit, MySQL5.7 1. Configure YUM source Download the YUM source rpm installation package from the MySQL official website: http://dev.mysql.com/downloads/repo/yum/ # Download the mysql source installation package shell> wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm # Install mysql source shell> yum localinstall mysql57-community-release-el7-8.noarch.rpm Check whether the mysql source is installed successfully shell> yum repolist enabled | grep "mysql.*-community.*"
2. Install MySQL shell> yum install mysql-community-server 3. Start MySQL service shell> systemctl start mysqld Check the startup status of MySQL shell> systemctl status mysqld ● mysqld.service – MySQL Server Loaded: loaded (/usr/lib/systemd/system/mysqld.service; disabled; vendor preset: disabled) Active: active (running) since 2016-06-24 04:37:37 CST; 35 minutes ago Main PID: 2888 (mysqld) CGroup: /system.slice/mysqld.service └─2888 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid Jun 24 04:37:36 localhost.localdomain systemd[1]: Starting MySQL Server... Jun 24 04:37:37 localhost.localdomain systemd[1]: Started MySQL Server. 4. Start the machine shell> systemctl enable mysqld shell> systemctl daemon-reload 5. Modify the root local login password After mysql is installed, a default password is generated for root in the /var/log/mysqld.log file. Find the root default password in the following way, and then log in to mysql to modify it: shell> grep 'temporary password' /var/log/mysqld.log shell>mysql -uroot -p mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!'; or mysql> set password for 'root'@'localhost'=password('MyNewPass4!'); Note: MySQL 5.7 has a password security check plug-in (validate_password) installed by default. The default password check policy requires that the password must contain uppercase and lowercase letters, numbers, and special symbols, and the length must not be less than 8 characters. Otherwise, the error message ERROR 1819 (HY000): Your password does not satisfy the current policy requirements will be displayed, as shown in the following figure: You can view password policy information through the msyql environment variable: mysql> show variables like '%password%'; validate_password_policy: Password policy, the default is MEDIUM policy There are the following password policies: |
<<: A method of hiding processes under Linux and the pitfalls encountered
>>: Secondary encapsulation of element el-table table (with table height adaptation)
Table of contents introduce Example Summarize int...
Generally, during the development process, the su...
1. Scroll Snap is a must-have skill for front-end...
Start a new project This article mainly records t...
1. Basic Concepts //Any container can be specifie...
One day I found that the execution speed of a SQL...
Overview of MySQL Partitioned Tables As MySQL bec...
Blank's blog: http://www.planabc.net/ The use...
The method found on the Internet works The footer ...
1. Overflow Overflow is overflow (container). Whe...
Preface In the last issue, we explained LinearLay...
Table of contents 1. for loop 2. Double for loop ...
Introduction Because JavaScript is single-threade...
Table of contents 1. Introduction 2. The differen...
These two attributes are often used, but their di...