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

Example code for implementing verification code login in SMS API in Node

1. Node server setup + database connection The op...

Detailed deployment of Alibaba Cloud Server (graphic tutorial)

I have recently learned web development front-end...

An example of vertical centering of sub-elements in div using Flex layout

1. Flex is the abbreviation of Flexible Box, whic...

How to install and configure the supervisor daemon under centos7

Newbie, record it yourself 1. Install supervisor....

The linkage method between menu and tab of vue+iview

Vue+iview menu and tab linkage I am currently dev...

Code to enable IE8 in IE7 compatibility mode

The most popular tag is IE8 Browser vendors are sc...

Nginx domain forwarding usage scenario code example

Scenario 1: Due to server restrictions, only one ...

MYSQL performance analyzer EXPLAIN usage example analysis

This article uses an example to illustrate the us...

How to distinguish MySQL's innodb_flush_log_at_trx_commit and sync_binlog

The two parameters innodb_flush_log_at_trx_commit...

React implements multi-component value transfer function through conetxt

The effect of this function is similar to vue的pro...

What are the benefits of semantic HTML structure?

one: 1. Semantic tags are just HTML, there is no ...

Introduction to ApplicationHost.config (IIS storage configuration area file)

For a newly created website, take ASP.NET MVC5 as...

Tutorial on installing mysql5.7.18 on mac os10.12

I searched the entire web and found all kinds of ...