[mysql]ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default value
From: http://m.blog.csdn.net/blog/langkeziju/13511411
我的MySQL版本为5.6.14版本,是二进制包安装的(虽然是二进制包安装的,但是以下问题同样适用于源码安装包安装的MySQL)
今天在我的测试库上添加一个新用户,报错:
[mysql@ydrh2 ~]$ mysql -uroot -p123456
Warning: Using a password on the command line interface can be 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) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be 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
You 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 have a default value
原因:在我的配置文件my.cnf中有这样一条语句
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
指定了严格模式,为了安全,严格模式禁止通过insert 这种形式直接修改mysql库中的user表进行添加新用户
解决办法:
将配置文件中的STRICT_TRANS_TABLES删掉,即改为:
sql_mode=NO_ENGINE_SUBSTITUTION
然后重启mysql即可
[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 解决方法
在MySQL数据库中的mysql.user表中使用insert语句添加新用户时,可能会出现以下错误: ERROR 1364 (HY000): Field 'ssl_cipher' doesn't ha ...
- [mysql]ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default value
转载自:http://www.cnblogs.com/joeblackzqq/p/4526589.html From: http://m.blog.csdn.net/blog/langkeziju/1 ...
- mysql 5.7 创建用户报错ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default value
如: INSERT INTO user (host, user, authentication_string, select_priv, insert_priv, update_priv) VALUE ...
- MySQL添加用户错误:ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default value解决方法
MySQL添加新用户时出现如下报错,如下图: 经过查资料了解到: mysql用户表的中某些字段不能为空,没有默认值,其实是操作错误,mysql添加用户是不能这样直接insert user表的. 改为以 ...
- Linux MySQl 5.7.17 MySQL ERROR 1366(HY000):Incorrect string value 解决方法
MySQL ERROR 1366(HY000):Incorrect string value,在往数据库中插入中文的时候会出现. 这也就是编码问题,网上大部分都是说设置下配置文件中的设置,而可悲的是在 ...
- MySQL:ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
解决方法: 修改密码:alter user 'root'@'localhost' identified by '123456'; mysql> use mysql; ERROR 1820 (HY ...
- mysql - ERROR 1114 (HY000): The table is full
mysql - ERROR 1114 (HY000): The table is full - Stack Overflowhttps://stackoverflow.com/questions/73 ...
- [MySQL-1] mysql error 1101 blob/text column can't have a default value
在MySQL Query Browser上创建一个含有TEXT类型的字段,创建不成功,报错:mysql error 1101 blob/text column can't have a default ...
- MySQL ERROR 1366(HY000) Incorrect string value
有以下两张表: mysql> show tables; +---------------+ | Tables_in_old | +---------------+ | book | | pres ...
随机推荐
- 隐藏windows任务栏中的窗口显示
在实际应用中遇到类似下列需要: 隐藏windows窗口,在windows任务栏中窗口不可见,但应用程序在后台运行. windows应用程序的窗口默认会在任务栏中添加一个可见的窗口项,方便用户操作和在不 ...
- pthread之线程堆栈
转:http://blog.csdn.net/horstlinux/article/details/7666032 //先来讲说线程内存相关的东西,主要有下面几条: //进程中的所有的线程共享相同的地 ...
- 显示eclipse中Problem窗口的方法
https://blog.csdn.net/ningfuxuan/article/details/76395029 ****************************************** ...
- Python+SparkStreaming+kafka+写入本地文件案例(可执行)
从kafka中读取指定的topic,根据中间内容的不同,写入不同的文件中. 文件按照日期区分. #!/usr/bin/env python # -*- coding: utf-8 -*- # @Tim ...
- 如何在Oracle中一次执行多条sql语句 (.net C#)
关键是不能换行,要加上begin ...sql... end; 每个SQL用:隔开,end后面必须加: 以下是拷贝于:http://www.cnblogs.com/teamleader/arc ...
- jetty debug修改 java static 静态变量值不会生效
在jetty debug模式下修改static静态变量值不会重新Load 因为jetty是嵌入式web容器,static静态变量是全局的,如果想生效,就必须重启jetty 在热部署的时候tomcat会 ...
- Web基础 HTML CSS JS JQuery AJAX
1. Web基础 网页的骨骼HTML 什么是HTML超文本标记语言:Hyper Text Markup Language 这都不重要,重要的是:HTML是Web网页的基本组成部分HTML中定义的元素, ...
- Oracle查看数据库表的创建时间
select OBJECT_NAME, CREATED from DBA_OBJECTS obj, USER_TABLES tab where obj.OBJECT_NAME = tab.TABLE_ ...
- Android ListView的使用(二)
上一章使用ListView和ArrayAdapter 进行了最简单的操作. 本文来自文档来自:http://www.runoob.com/w3cnote/android-tutorial-adapte ...
- [转]MYSQL 与 Oracle 之间的数据类型转换
原文地址:http://www.cnblogs.com/guyueyanzi/archive/2010/02/27/1674788.html Table 2-4 Default Data Type M ...