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
First install the dependent packages to avoid pro...
Problem Description In the recent background serv...
The use of ElementUI paging component Pagination ...
(When a web page is loading, sometimes there is t...
I am writing a small program recently. Because th...
Table of contents 1. classList attribute 2. Pract...
The Kubernetes team recently announced that it wi...
The following example code introduces the princip...
Table of contents 1. The elephant that can’t fit ...
This article example shares the specific code for...
This article example shares the specific code of ...
Method 1: var a = [1,2,3]; var b=[4,5] a = a.conc...
Table of contents Prerequisites DNS domain name r...
I have been using MySQL recently. The article mys...
This article example shares the specific code of ...