How to open external network access rights for mysql

How to open external network access rights for mysql

As shown below:

Mainly execute authorization commands:

Two ways

1. Allow any host to connect to the local server with user bd and password bdpw

mysql> GRANT ALL PRIVILEGES ON *.* TO 'bd'@'%' IDENTIFIED Y 'bdpw' WITH GRANT OPTION;
mysql> flush privileges;

2. Allow specific IP addresses to connect to the local server with user bd and password bdpw

mysql> GRANT ALL PRIVILEGES ON *.* TO 'bd'@'172.16.4.198' DENTIFIED BY 'bdpw' WITH GRANT OPTION; 
mysql> flush privileges;

Notice:

1. Enter the password in the Command Line Client or enter the Nivacat command line interface.

2. Input: use mysql;

3. Query host input: select user,host from user;

If there is a host value of %, execute the authorization statement directly; if not, execute step 4

4. Create a host

If there is no host value of "%", select an open user (bd) and execute

mysql> update user set host='%' where user='bd'; 
mysql> flush privileges;

5. Authorized user *.* indicates authorization of all permissions

mysql> GRANT ALL PRIVILEGES ON *.* TO 'bd'@'%' IDENTIFIED BY 'bdpw' WITH GRANT OPTION; 
mysql> flush privileges;

The above method of opening external network access rights for MySQL is all I have to share with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM.

You may also be interested in:
  • How to set up to allow external network access to MySQL
  • Mysql allows external network access settings steps
  • Sharing the detailed process of setting up Mysql5.6 to allow external network access
  • How to set up MySQL to allow external network access
  • The whole process of Mysql opening external network access

<<:  5 Easy Ways to Free Up Space on Ubuntu

>>:  How to delete a property of an object in JavaScript

Recommend

How to implement simple data monitoring with JS

Table of contents Overview first step Step 2 Why ...

7 native JS error types you should know

Table of contents Overview 1. RangeError 2. Refer...

Installing Win10 system on VMware workstation 14 pro

This article introduces how to install the system...

Detailed explanation of object literals in JS

Table of contents Preface 1. Set the prototype on...

Implementing file content deduplication and intersection and difference in Linux

1. Data Deduplication In daily work, there may be...

Ubuntu 20.04 CUDA & cuDNN Installation Method (Graphical Tutorial)

CUDA installation download cuda Enter the nvidia-...

How to migrate sqlite to mysql script

Without further ado, I will post the code for you...

The difference and usage of Vue2 and Vue3 brother component communication bus

Table of contents vue2.x vue3.x tiny-emitter plug...

Using JavaScript in HTML

The <script> tag In HTML5, script has the f...

How to Enable or Disable Linux Services Using chkconfig and systemctl Commands

This is an important (and wonderful) topic for Li...

Detailed explanation of Nginx access restriction configuration

What is Nginx access restriction configuration Ng...

Innodb system table space maintenance method

Environmental Description: There is a running MyS...

JS interview question: Can forEach jump out of the loop?

When I was asked this question, I was ignorant an...