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

Data Control method of MySQL and PHP

2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article introduces the relevant knowledge of "data control methods of MySQL and PHP". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Data control language

Data Control language (Data Control Language) is a statement used to set or change database user or role permissions.

The hierarchy description global hierarchy applies to all databases in a given server. These permissions are stored in the mysql.user table at the database level for all targets in a given database. These permissions are stored in mysql.db and mysql.host tables at the surface level for all columns in a given table. These permissions are stored at the column level in the mysql.tables_priv table and used in a single column in a given table. These permissions are stored at the mysql.columns_priv subprogram level CREATE ROUTINE, ALTER ROUTINE, EXECUTE and GRANT permissions apply to stored subroutines. These permissions can be granted at the global level and database level MySQL authority system

The permission information of MySQL is mainly stored in the following tables. When the user connects to the database, MySQL will verify the user's rights according to these tables.

Table name describes user user permissions table, record account, password and global permission information db records database related permissions table_priv user permissions on a table column_priv user permissions on a table procs_priv user permissions on stored procedures and stored functions user management

In MySQL, you use CREATE USER to create a user who does not have any permissions after creation.

View all users:

Create a user

The user account of MySQL consists of two parts: user name and host name, that is, user name @ host name, host name can be IP or machine name, and host name% means that hosts anywhere are allowed to log in to MySQL database remotely.

Format:

CREATE USER 'username' [@ 'hostname'] [IDENTIFIED BY 'password']

Example:

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: 0

*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

Development

Wechat

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

12
Report