当前位置:Gxlcms > 数据库问题 > [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 解决方法

时间:2021-07-01 10:21:17 帮助过:2人阅读

原因是在my.ini配置文件中有这样一条语句

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

  指定了严格模式,为了安全,严格模式禁止通过insert 这种形式直接修改mysql库中的user表进行添加新用户

 

方法一、修改my.ini配置文件

打开my.ini,查找 
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
修改为
sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
然后重启MYSQL

 

方法二、grant授权方法

GRANT USAGE ON *.* TO ‘username‘@‘localhost‘ IDENTIFIED BY ‘password‘ WITH GRANT OPTION;

  然后对该用户进行书库和表授权

grant all privileges on *.* to ‘username‘@‘localhost‘ identified by ‘password‘;

//生效授权
flush privileges;

  

[mysql]ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default value 解决方法

标签:

人气教程排行