To increase user action rights
Grant all privileges in ' db_name '. * to ' user_name ' @ ' HOST ' with GRANT OPTION;
Grant normal data user, the right to query, insert, UPDATE, and delete all table data in the database.
Grant SELECT on testdb.* to common_user@ '% '
Grant insert on testdb.* to common_user@ '% '
Grant update on testdb.* to common_user@ '% '
Grant Delete on testdb.* to common_user@ '% '
Alternatively, replace it with a MySQL command:
Grant SELECT, INSERT, UPDATE, delete on testdb.* to common_user@ '% '
1. Grant functions on the entire MySQL server:
Grant SELECT on *.* to Dba@localhost; --The DBA can query the tables in all databases in MySQL.
Grant all on *.* to Dba@localhost; --DBA can manage all databases in MySQL
2. Grant functions on a single database:
Grant SELECT on testdb.* to Dba@localhost; --DBAs can query the tables in TestDB.
3. Grant functions on a single datasheet:
Grant SELECT, INSERT, UPDATE, delete on testdb.orders to Dba@localhost;
4. Grant acts on the columns in the table:
Grant Select (ID, SE, rank) on Testdb.apache_log to Dba@localhost;
5. Grant functions on stored procedures, functions:
Grant execute on procedure testdb.pr_add to ' dba ' @ ' localhost '
Grant execute on function testdb.fn_add to ' dba ' @ ' localhost '
Grant Database Developer, create tables, indexes, views, stored procedures, functions ... and other permissions.
Grant creates, modifies, and deletes MySQL data table structure permissions.
Grant create on testdb.* to developer@ ' 192.168.0.% ';
Grant alter on testdb.* to developer@ ' 192.168.0.% ';
Grant drop on testdb.* to developer@ ' 192.168.0.% ';
Grant operates MySQL foreign key permissions.
Grant references on testdb.* to developer@ ' 192.168.0.% ';
Grant operates the MySQL temporary table permission.
Grant create temporary tables on testdb.* to developer@ ' 192.168.0.% ';
Grant operates MySQL indexing permissions.
Grant index on testdb.* to developer@ ' 192.168.0.% ';
Grant operates the MySQL view and views the view source code permissions.
Grant CREATE view on testdb.* to developer@ ' 192.168.0.% ';
Grant Show view on testdb.* to developer@ ' 192.168.0.% ';
Grant operates MySQL stored procedures, function permissions.
Grant create routine on testdb.* to developer@ ' 192.168.0.% '; --now, can show procedure status
Grant alter routine on testdb.* to developer@ ' 192.168.0.% '; --now, can drop a procedure
Grant execute on testdb.* to developer@ ' 192.168.0.% ';