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

HTML4.0 element default style arrangement

Copy code The code is as follows: html, address, ...

Why Seconds_Behind_Master is still 0 when MySQL synchronization delay occurs

Table of contents Problem Description Principle A...

The whole process record of introducing Vant framework into WeChat applet

Preface Sometimes I feel that the native UI of We...

Implementation of react automatic construction routing

Table of contents sequence 1. Centralized routing...

HTML form tag tutorial (5): text field tag

<br />This tag is used to create a multi-lin...

Detailed explanation of how to use several timers in CocosCreator

1. setTimeOut Print abc after 3 seconds. Execute ...

What are your principles for designing indexes? How to avoid index failure?

Table of contents Primary key index Create indexe...

Detailed explanation of redundant and duplicate indexes in MySQL

MySQL allows you to create multiple indexes on th...

Detailed explanation of three ways to connect Docker containers to each other

There are three ways to interconnect and communic...

Share 20 excellent web form design cases

Sophie Hardach Clyde Quay Wharf 37 East Soapbox Rx...

Tutorial on installing and configuring remote login to MySQL under Ubuntu

This article shares the MySQL installation and co...

Solution to the problem of var in for loop

Preface var is a way to declare variables in ES5....

SMS verification code login function based on antd pro (process analysis)

Table of contents summary Overall process front e...