Preface: Recently I am going to team up with my partners to work on a .NET Core project. So I rented an Alibaba Cloud server and installed Linux and MySQL. My Linux here is CentOs 7. The first step is to add the Mysql Yum library Here you need to go to the official website to get a specific rpm package. I chose the following package Transfer the RPM package to the Opt directory on the Linux server through Xshell and enter the command: sudo rpm -Uvh mysql80-community-release-fc28-1.noarch.rpm The second step is to select the version you need (default 8.0) Here we manually configure it to version 5.7 and enter the following command: sudo yum-config-manager --disable mysql80-community sudo yum-config-manager --enable mysql57-community Then enter the view command to see the following picture: yum repolist all | grep mysql Here you may be prompted that the yum-config-manager command is not installed. Don’t worry, this command is in the yum-utils package and can be installed using the command yum -y install yum-utils. You can also modify the /etc/yum.repos.d/mysql-community.repo file to achieve the same effect. Step 3 Install Mysql sudo yum install mysql-community-server Step 4: Start the Mysql service sudo service mysqld start You can check the status of the service with sudo service mysqld status Step 5 Log in to MySql mysql -uroot -p found that I need to enter a password but I don’t know it. In fact, when installing MySQL, a password is set for us by default, and the Password Validation Component is installed, which performs policy checks on the password. We can view the default password by entering sudo grep 'temporary password' /var/log/mysqld.log mysql>ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!'; mysql>Flush Privileges; This way we can log in with the new password. Step 6 Authorize MySql remote login Method 1: Modify the host of the user table in the MySQL database. mysql>update user set host = '%' where user = 'root'; mysql>select host, user from user; mysql>Flush Privileges; Method 2: Authorize remote IP mysql>GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'192.168.1.3'IDENTIFIED BY 'mypassword' WITH GRANT OPTION; mysql> FLUSH PRIVILEGES Then you can access it with Navicat: 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:
|
<<: How to deploy nginx with Docker and modify the configuration file
>>: A brief discussion on how to write beautiful conditional expressions in JS
Master-slave synchronization, also called master-...
Installation environment: CAT /etc/os-release Vie...
1. Download, I take 8.0 as an example Download ad...
1. Introduction Whether the creation time of a fi...
Online shopping mall database-product category da...
This article shares the specific code of js to im...
How can we say that we should avoid 404? The reas...
Preface: In some application scenarios, we often ...
Table of contents 1. Default values for functio...
Memo: Just experience it. Record: NO.209 This exa...
If an index contains (or covers) the values of ...
Our veteran predecessors have written countless c...
introduction In recent years, the call for TypeSc...
I just finished installing MySQL 5.7.19 in the ea...
Table of contents 1. Why Redux 2. Redux Data flow...