【1】显示mysql数据库中的所有用户
selectdistinctconcat (' user : ' ',user,' ' @ ',host,';' ) AS query FROM mysql.user;
【2】查看某个用户的权限
show grants for 'nextcloud'@'% '; or select * from MySQL.userwhereuser=' root 'g;
【3】查看当前用户
选择用户(;
【4】更改用户密码
use mysql; UPDATE user SET password=PASSWORD (“新密码”) WHERE user=“用户”; flush privileges; 【5】变更用户权限和密码
grant权限on库名称.表名to '用户名' @ '网段' ' ‘ identified by ' '该用户的密码'; grantallprivilegesonnextcloud.* to ' next cloud ' @ ' % ' identified by ' du . ol CTX . entest.1 '; 【6】删除用户
drop user 'nextcloud'@'% '; 【7】补充
mysql数据库许可证链接为以下:
3359 blog.csdn.net/GX _1_ 11 _ real/article/details/81200566
ps:
所有案例的数据库都是测试库,如何才能生成数据库,用户很少,权限设置也没有三权分立的原则