Field 'ssl_cipher' doesn't have a default value
Posted cnblogs_2015
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Field 'ssl_cipher' doesn't have a default value相关的知识,希望对你有一定的参考价值。
mysql> insert into mysql.user(Host,User,Password) values("localhost","hc_community",password("hc_community@12345678"));
ERROR 1364 (HY000): Field \'ssl_cipher\' doesn\'t have a default value
原因是mysql5.7以上会出现上述提示。
改成这种方式:
mysql>GRANT USAGE ON hc_community.* TO \'hc_community\'@\'localhost\' IDENTIFIED BY \'hc_community@12345678\' WITH GRANT OPTION;
mysql>flush privileges;
问题解决,如果出现 The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement问题
则先执行flush privileges;再执行语句。
以上是关于Field 'ssl_cipher' doesn't have a default value的主要内容,如果未能解决你的问题,请参考以下文章
[mysql] 无法通过insert 创建用户ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default val
mysql创建用户报错ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default value
MySQL添加用户错误:ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default value解决方法(示例代码
Field 'id' doesn't have a default value