create database user123 default charset utf8 collate utf8_general_ci; #先建立一个库
create user 'user23'@'%' identified by 'a123456'; #创建用户,密码
grant all privileges on user123.* to 'user123'@'%' with grant option; #授权某个库给用户
或
grant all privileges on *.* to 'tone'@'%' with grant option; #授权全部库给该用户
flush privileges;
MySQL8创建用户,授权
2019-03-16 14:31:37
点击:
下面是创建用户user123,数据库名user123,密码工23456为例:create databaseuser123 default charset utf8 collate utf8_general_ci;
下面是创建用户user123,数据库名user123,密码工23456为例:
相关热词搜索:
上一篇:mySQL_解决ERROR 2006 (HY000) at line XX MySQL server has gone away问题
下一篇:mysql8 Authentication plugin 'caching_sha2_password' cannot be loaded
评论排行
- ·Python是美国主流大学最...(5)
- ·HAProxy 配置 HTTP 负载均衡器(1)
- ·Linux+Nginx下SSL证书安装(1)
- ·linux开机自动挂载新硬盘...(1)
- ·linux手动挂载ext盘(1)
- ·mysql修复表,检查表,优...(1)
- ·linux配置网卡(1)
- ·windows下mysql binlog日志开启(1)
- ·Linux创造者Linus Torvalds(1)
- ·关于CentOS 6下Hadoop占...(1)
- ·apache2.4.10 for win 32/64安装教程(1)
- ·运维之家.FAN科技 ...(1)