from:http://m.blog.csdn.net/blog/langkeziju/13511411
My MySQL version is 5.6.14 version, is the binary package installed ( Although the binary package installed, but the following issues also apply to the source installation package installed MySQL)
Add a new user to my test library today with an error:
[email protected] ~]$ mysql-uroot-p123456
Warning:using a password on the command line interface can is insecure.
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 1
Server version:5.6.14-enterprise-commercial-advanced MySQL Enterprise server-advanced Edition (commercial)
Copyright (c) and/or, Oracle, its affiliates. All rights reserved.
Oracle is a registered trademark of the Oracle Corporation and/or its
Affiliates. Other names trademarks of their respective
Owners.
Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.
mysql> INSERT INTO user (Host,user,password) VALUES ("localhost", "Peter1", Password ("123456"));
ERROR 1046 (3d000): No Database selected
mysql> use MySQL;
Reading table information for completion of table and column names
Can turn off this feature to get a quicker startup with-a
Database changed
mysql> INSERT INTO user (Host,user,password) VALUES ("localhost", "Peter1", Password ("123456"));
ERROR 1364 (HY000): Field ' ssl_cipher ' doesn ' t has a default value
cause : There is a statement in my config file my.cnf
Sql_mode=no_engine_substitution,Strict_trans_tables
Strict mode is specified, in order to be secure, strict mode is forbidden to add new users by directly modifying the user table in the MySQL library via insert form
Workaround:
Delete the strict_trans_tables in the configuration file and change to:
Sql_mode=no_engine_substitution
Then restart MySQL to
[MySQL] ERROR 1364 (HY000): Field ' ssl_cipher ' doesn ' t has a default value