@wangyupu
2022-09-14T06:47:46.000000Z
字数 480
阅读 28
Mysql数据库
mysql -uroot -p
create user 'testuser1'@'%' identified by '123456';
flush privileges;
grant all privileges on test_grant.* to 'testuser1'@'%' with grant option;
show grants for 'testuser1'@'%';
revoke all privileges on test_grant.* from 'testuser1'@'%';
revoke all privileges,grant option from 'testuser1'@'%';
drop user 'testuser1'@'%';
SELECT DISTINCT CONCAT('User: ''',user,'''@''',host,''';') AS query FROM mysql.user;
SELECT User, Host FROM mysql.user;