查看MYSQL数据库中所有用户
mysql> SELECT DISTINCT CONCAT(‘User: ‘‘‘,user,‘‘‘@‘‘‘,host,‘‘‘;‘) AS query FROM mysql.user;
查看数据库中具体某个用户的权限
mysql> show grants for ‘cactiuser‘@‘%‘;
删除用户
Delete FROM user Where User=‘test‘ and Host=‘localhost‘;
修改用户密码
update mysql.user set password=password(‘新密码‘) where User="用户" and Host="localhost";
删除数据库和数据表
mysql>drop database 数据库名;
mysql>drop table 数据表名;
时间: 2024-10-25 20:03:26