Get the App
SLTechnology News&Howtos  ›  Database  › 

How to set Local area Network connection permissions in MySql

Shulou Source: shulou.com Published: 2022-05-31 18:57:52 10月31日 Update

This article will explain in detail how to set up local area network connection permissions in MySql. The content of the article is of high quality, so the editor will share it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

MySql LAN connection permission problem

Solution: you only need to execute a command in the MySql console to assign LAN connection permissions.

Command: grant all privileges on *. * to identified by'1'

Explanation: for 192.168.1.19 host, open all operations on all tables of MySql in this connection, user name is joe, password is 1

After execution: you can log in with the user joe password 1 on the localhost host * * 192.168.1.19 can be any host in the LAN

-

Command details: > grant permission 1, permission 2, … Permission n on database name. Table name to user name @ user address identified by' password

14 permissions: www.2cto.com select,insert,update,delete,create,drop,index,alter,grant,references,reload,shutdown,process,file, etc.

Full permissions: all privileges or all means to grant full permissions to the user.

? Table selection: database name. Table name, *. * represents all tables in all databases

Example:

Mysql > grant select,insert,update,delete,create,drop on vtdc.employee to joe@10.163.225.87 identified by '123'

Examples explain:

Open, vtdc database, employee table, select,insert,update,delete,create,drop permissions

Give the user 10.163.225.87, user name joe password 123

On how to set up local area network connection permissions in MySql to share here, I hope the above content can be of some help to you, you can learn more knowledge. If you think the article is good, you can share it for more people to see.

Tags: Permissions user local area LAN password data database host command example content name article more user name knowledge article open explanation good Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi MySQL Docker macOS Shulou Tech Info