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;再执行语句。