Detailed explanation of the process of deploying MySql on Centos server and connecting to Navicat

Detailed explanation of the process of deploying MySql on Centos server and connecting to Navicat

(1) Server configuration:

[root@localhost ~]# cd /usr/local/src/

[root@localhost src]# wget http://repo.mysql.com/mysql57-community-release-el7-8.noarch.rpm 

[root@localhost src]# rpm -ivh mysql57-community-release-el7-8.noarch.rpm 

"""
mysql-community-client-5.7.30-1.el7.x86_64.rpm   
mysql-community-server-5.7.31-1.el7.x86_64.rpm
"""
Import these two rpm packages via FTP: /var/cache/yum/x86_64/7/mysql57-community/packages/

[root@localhost src]# yum -y install mysql-server

Long waiting time

(2) Reset password and create user

#Restart mysql service [root@VM-0-3-centos src]# service mysqld restart

#Reset password [root@localhost ~]# grep "password" /var/log/mysqld.log 

#Password resetmysql> alter user 'root'@'localhost' identified by 'password';//Password reset, new passwordQuery OK, 0 rows affected (0.00 sec)

#Create a new user,
mysql> create user 'username'@'%' identified by 'paswword'; //Add new user, password Query OK, 0 rows affected (0.00 sec) #Assign permissions to new users mysql> grant all privileges on *.* to 'user1'@'%' with grant option;
  Query OK, 0 rows affected (0.00 sec)
   # Refresh permissions
     mysql> flush privileges;
   Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

# Refresh permissions

mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)

(3) Query the current MySql user:

mysql> select user,host from mysql.user;
+---------------+-----------+
| user | host |
+---------------+-----------+
| user1 | % |
| mysql.session | localhost |
| mysql.sys | localhost |
| root | localhost |
+---------------+-----------+
4 rows in set (0.00 sec)

mysql>

(4)Connect on Navicat

【General】End configuration parameters

【SSH】End configuration parameters

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:
  • Steps to create a CentOS container through Docker
  • Docker creates a centos container and downloads MySQL in the container to connect to MySQL locally

<<:  Several implementation methods and advantages and disadvantages of SQL paging query in MySQL

>>:  JavaScript implements select all and unselect all operations

Recommend

Detailed explanation of docker's high availability configuration

Docker Compose Docker Compose divides the managed...

Detailed explanation of Vue lazyload picture lazy loading example

Documentation: https://github.com/hilongjw/vue-la...

How to uninstall Linux's native openjdk and install sun jdk

See: https://www.jb51.net/article/112612.htm Chec...

Detailed explanation of the use of vue-resource interceptors

Preface Interceptor In some modern front-end fram...

MySQL 8.0.20 Installation Tutorial with Pictures and Text (Windows 64-bit)

1: Download from mysql official website https://d...

Usage and best practice guide for watch in Vue3

Table of contents Preface🌟 1. API Introduction 2....

Vue project @change multiple parameters to pass multiple events

First, there is only one change event. changeleve...

Detailed explanation of location and rewrite usage in nginx

1. Summary of location usage Location can locate ...

Several ways to encapsulate breadcrumb function components in Vue3

Table of contents Preface 1. Why do we need bread...

Introduction to MySQL statement comments

MySQL supports three types of comments: 1. From t...

Docker link realizes container interconnection

Table of contents 1.1. Network access between con...

The concrete implementation of JavaScript exclusive thinking

In the previous blog, Xiao Xiong updated the meth...

Let's talk about the difference between containers and images in Docker

What is a mirror? An image can be seen as a file ...

Use pure CSS to achieve switch effect

First is the idea We use the <input type="...