mariadb 常用授权命令
创建用户和给用户赋权的操作:
修改用户host:rename user 'root'@'localhost' to 'root'@'%'; ###update user set host='%' where user='root';不行,因为MariaDB的user表是一个视图
创建用户:create user '用户名'@'%' identified by '密码';
修改用户密码:alter user '用户名'@'%' identified by '密码';
删除用户:drop mysql.user '用户名'@'%';
授权用户:grant all on *.* to '用户名'@'%' identified by '密码' with grant option;
转载请记录来源!!!!
https://www.cnblogs.com/leihongnu/