[MySQL] Cannot create user error 1364 (HY000) by insert: Field ' ssl_cipher ' doesn ' t has a default value

Source: Internet
Author: User
Tags mysql version

[MySQL] ERROR 1364 (HY000): Field ' ssl_cipher ' doesn ' t has a default value

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 such a statement in my profile my.cnf (My.ini in the Windows operating system)

Sql_mode=no_engine_substitution,strict_trans_tables

Sql-mode= "Strict_trans_tables,no_auto_create_user,no_engine_substitution" (in My.ini)

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

In the Windows operating system, for

Sql-mode= "No_engine_substitution"

Then restart MySQL to

from:http://m.blog.csdn.net/blog/langkeziju/13511411

[MySQL] Cannot create user error 1364 (HY000) by insert: Field ' ssl_cipher ' doesn ' t has a default value

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.