新建用户,并授予所有权限:
grant all privileges on *.* to ‘username‘@‘localhost‘ identified by ‘password‘ with grant option;
进入mysql数据库,查询user表和db表可见权限设置
user mysql;
select * from user where user=‘username‘ and host=‘localhost‘ \G;
select * from db \G;
时间: 2024-11-09 00:29:27