Today for the first time to play MySQL, in the default database MySQL create user times error:
ERROR 1364 (HY000): Field ' ssl_cipher ' doesn ' t have a default value
mysql> use MySQL;
Reading table information for completion of table and column names
You can turn off the feature to get a quicker startup with-a
Database changed
Mysql> SELECT Host, user, password from user where user = ' guest ';
Empty Set (0.23 sec)
Mysql> INSERT into user
-> (host, user, password,
-> Select_priv, Insert_priv, Update_priv)
-> VALUES (' localhost ', ' scofy ',
-> PASSWORD (' MySQL '), ' y ', ' y ', ' y ');
ERROR 1364 (HY000): Field ' ssl_cipher ' doesn ' t have a default value
Reason: There is a statement in my profile my.cnf
Sql_mode=no_engine_substitution,strict_trans_tables
Strict mode is specified, in order to be secure, strict mode prohibits directly modifying the user table in the MySQL library to add new users in this form of insert
Solution:
Delete the strict_trans_tables in the configuration file to read:
Sql_mode=no_engine_substitution
and restart MySQL.
mysql> use MySQL;
Reading table information for completion of table and column names
You can turn off the feature to get a quicker startup with-a
Database changed
Mysql> INSERT into user
-> (host, user, password,
-> Select_priv, Insert_priv, Update_priv)
-> VALUES (' localhost ', ' scofy ',
-> PASSWORD (' MySQL '), ' y ', ' y ', ' y ');
Query OK, 1 row affected, 3 warnings (0.00 sec)
Mysql> SELECT Host, user, password from user where user = ' scofy ';
+-----------+-------+-------------------------------------------+
| Host | user | password |
+-----------+-------+-------------------------------------------+
| localhost | Scofy | *e74858db86eba20bc33d0aecae8a8108c56b17fa |
+-----------+-------+-------------------------------------------+
1 row in Set (0.01 sec)