There is no mysql by default in the yum source of Centos7, because mariaDB has been used instead of mysql. First, we download the mysql repo source. We can go to the mysql official website to find the latest repo source address. address: https://dev.mysql.com/downloads/repo/yum/ Start downloading the repo source under linux //Download mysql rpm package# wget http://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm //Install mysql rpm package# rpm -ivh mysql57-community-release-el7-11.noarch.rpm //Install mysql # yum install mysql-community-server After successful installation, you need to restart the mysql service. # service mysqld restart When MySQL 5.7 is first installed, a root password will be randomly generated. We need to find this random password first and then change the new password. We can find the random root password through the grep command. [root@local bin]# grep "password" /var/log/mysqld.log 2017-09-24T08:03:30.664086Z 1 [Note] A temporary password is generated for root@localhost: 8A3xwbk8_P1A Login to mysql using a random password [root@local bin]# mysql -uroot -p Enter password: Reset the root password after logging in mysql> SET password = PASSWORD("mysql123"); ERROR 1819 (HY000): Your password does not satisfy the current policy requirements If the above error message appears, it means that the password is set too simply. The password setting rule is to contain numbers, uppercase and lowercase letters, and strings. Finally, grant external network login permission, username is the user name, password is the login password mysql>grant all privileges on *.* to username@'%' identified by 'password'; The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Detailed usage of Linux text search command find
>>: Detailed explanation of using grep command in Linux
Hide version number The version number is not hid...
What are HTTP Headers HTTP is an abbreviation of ...
Table of contents Avoid repetitive rendering loop...
Preface This article mainly introduces 4 methods ...
When I was in the securities company, because the ...
Database migration is a problem we often encounte...
Recently, when using element table, I often encou...
Table of contents 1. Database bottleneck 2. Sub-l...
This time let’s look at a navigation bar layout w...
Table of contents MySql8.0 View transaction isola...
Unique “About”-Pages A great way to distinguish yo...
I don't know if it's because the binary d...
First, before posting! Thanks again to I Want to S...
Simply pull the image, create a container and run...
Preface Workbench is installed on one computer, a...