Install MySQL database a) Download the MySQL source installation package: wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm b) Install MySQL source: yum localinstall mysql57-community-release-el7-8.noarch.rpm If complete! appears at the end, it means that the MySQL source installation is complete. c) Check whether the installation is complete: yum repolist enabled | grep "mysql.*-community.*" d) Install mysql: yum install mysql-community-server If Complete! appears at the end, the MySQL installation is complete. e) Set to start the mysql service: systemctl enable mysqld f) Check the installed MySQL version: rpm -aq | grep -i mysql g) Start the MySQL service: systemctl restart mysqld h) View the initial MySQL password: grep 'A temporary password' /var/log/mysqld.log i) Change MySQL password: mysqladmin -u root -p 'old password' password 'new password' There is a problem with changing the password here and the change fails because the password is too simple. There are two solutions: Method 1: Make your password more complex (this is the most direct method) Method 2: Turn off MySQL password strength verification (validate_password) Edit the configuration file: vim /etc/my.cnf, add the line validate_password=off After editing, restart the mysql service: systemctl restart mysqld If you change the database port vim /etc/my.cnf add line prot=3306 After editing, restart the mysql service: systemctl restart mysqld j) Set up mysql to be accessible remotely: Log in to MySQL: mysql -uroot -p password Add a user to grant access rights: grant all privileges on permission group. Permission to 'root'@'ip address' identified by 'password' with grant option; //You can change the ip to %%, which means to enable all Refresh privileges: flush privileges; The above are all the relevant knowledge points introduced this time. Thank you for your learning and support for 123WORDPRESS.COM. You may also be interested in:
|
<<: Nginx prohibits direct access via IP and redirects to a custom 500 page
>>: Solve the problem of using swiper plug-in in vue
"Tik Tok" is also very popular and is s...
Find the problem Let's look at the problem fi...
Publish Over SSH Plugin Usage Before using Publis...
Adding the right VS Code extension to Visual Stud...
The following error is reported when MySQL joins ...
Preface Nginx 's built-in module supports lim...
Table of contents queueMicrotask async/await Mess...
Table of contents 1. Introduction 2. Implementati...
The main function of the brower module is to dete...
1. Inline elements only occupy the width of the co...
Starting from MySQL 8.0.16, you can set a passwor...
In our life, work and study, social networks have ...
Table of contents Install: 1. Basic use of firewa...
Table of contents design Component Communication ...
Basic syntax The use of text-overflow requires th...