原创

linux下musql添加新用户

遇到的异常

ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default value

问题由来:
新建用户时我使用了

insert into mysql.user(Host,User,Password) values("localhost","username",password("123456"));

导致报错,mysql版本5.7;
正确新建用户语句:

GRANT USAGE ON *.* TO 'username'@'localhost' IDENTIFIED BY '123456' WITH GRANT OPTION;
正文到此结束
本文目录