Home  >  Article  >  Database  >  How to set up reading and writing in mysql table

How to set up reading and writing in mysql table

藏色散人
藏色散人Original
2020-11-03 09:59:362588browse

Mysql table setting read and write methods: 1. Set read and write permissions through client operations; 2. Set read and write through command line operations, statements such as "grant select, insert, update, delete on bond_db.* to pats@'%'".

How to set up reading and writing in mysql table

Recommended: "mysql video tutorial"

MySQL database sets read and write permissions for a table

Set by client operation

Follow the order in the picture

How to set up reading and writing in mysql table

If you want to set For the user's read and write permissions on the entire database, just select global privileges in the second step.

Through command line operation

Access permissions can be controlled at several levels through grant and revoke

1, the entire server, use grant ALL and revoke ALL

2, the entire database, use on database.*

3, feature table, use on database.table

4, specific columns

5, specific stored procedures

grant select, insert, update, delete on bond_db.* to pats@’%’

Comprehensive

The client is simpler, but the command line can perform more detailed operations. In general, the client can be used. Use the command line in special cases.

The above is the detailed content of How to set up reading and writing in mysql table. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn