码迷,mamicode.com
首页 > 数据库 > 详细

mysql 创建新用户

时间:2017-07-03 22:43:36      阅读:237      评论:0      收藏:0      [点我收藏+]

标签:into   strong   int   hup   min   option   使用   auth   mysql   

mysql -version

mysqladmin  Ver 8.42 Distrib 5.7.12, for Win64 on x86_64

使用时用insert 的方式创建新用户,报错:

 insert into user
    -> (host,user,authentication_string)
    -> VALUES(‘localhost‘,‘hupi‘,PASSWORD(‘123456‘));
ERROR 1364 (HY000): Field ‘ssl_cipher‘ doesn‘t have a default value

后用以下方式创建成功

 grant usage on *.* to ‘hupi‘@‘localhost‘ identified by ‘123456‘ with grant option;

用户名 hupi ,密码 123456

赋予权限

grant all privileges on *.* to hupi@localhost identified by ‘123456‘;

flush privileges;

 

mysql 创建新用户

标签:into   strong   int   hup   min   option   使用   auth   mysql   

原文地址:http://www.cnblogs.com/hupi/p/7113108.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!