GRANT ALL PRIVILEGES ON your_db_name.table_1 to 'your_user_name'@'%';
GRANT ALL PRIVILEGES ON your_db_name.table_2 to 'your_user_name'@'%';
GRANT ALL PRIVILEGES ON your_db_name.table_3 to 'your_user_name'@'%';
GRANT ALL PRIVILEGES ON your_db_name.table_4 to 'your_user_name'@'%';
GRANT ALL PRIVILEGES ON your_db_name.table_5 to 'your_user_name'@'%';
GRANT CREATE ON db_name.* TO 'user_name'@'%';
GRANT SELECT, INSERT, UPDATE ON db_name.table_1 TO 'user_name'@'%';
GRANT SELECT, INSERT, UPDATE ON db_name.table_2 TO 'user_name'@'%';
1条答案
按热度按时间krugob8w1#
你应该考虑:
到目前为止,您的用户名只能访问这五个表。下面的grant将允许在指定的db中为“user\u name”创建表
一旦用户创建了表,就必须根据需要更新权限。