Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Steps for mysql to open public network to achieve access rights

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly gives you a brief description of the steps for mysql to open the public network to achieve access. You can check the relevant professional terms on the Internet or find some related books to supplement them. We will not dabble here, so let's go straight to the topic. I hope that this article on the steps for mysql to open the public network to achieve access can bring you some practical help.

As follows:

The main execution of authorization commands:

Two ways

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

?

12mysql > grant all privileges on *. * to 'bd'@'%' identified y' bdpw' with grant option;mysql > flush privileges

two。 Allow a specific ip address to connect to the local CVM with user bd and password bdpw

?

12mysql > grant all privileges on *. * to 'bd'@'172.16.4.198' dentified by' bdpw' with grant option;mysql > flush privileges

Note:

1. Enter your password in command line client or enter the command line interface of nivacat

two。 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, perform step 4

4. Create host

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

?

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

5. Authorized user *. * indicates that all permissions are authorized

?

12mysql > grant all privileges on *. * to 'bd'@'%' identified by' bdpw' with grant option;mysql > flush privileges

This is the first step for mysql to open up the public network to achieve access. If you want to know about other related issues, you can continue to pay attention to our industry information. Our section will capture some industry news and professional knowledge to share with you every day.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 212

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report