django使用mysql出现警告Warning: (3135, "'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release
django使用mysql出现警告
Warning: (3135, "'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.") Warning: (3090, "Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.")
中文意思是
警告:(3135,"'NO_ZERO_DATE', 'NO_ZERO_IN_DATE'和' error_for_division on_by_zero ' sql模式应该与严格模式一起使用。它们将在未来的版本中与strict模式合并。”
警告:(3090,“不建议更改sql模式‘NO_AUTO_CREATE_USER’”。它将在未来的版本中被删除。”
就是说SQL modes应该使用安全模式,即该功能将可能在未来的版本中被舍弃或者合并,这是MySQL向后兼容常见的处理方式
把setting里的options注释掉就正常了
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
"HOST": '127.0.0.1',
"PORT": '',
"NAME": "guest",
"USER": "root",
"PASSWORD": '',
# "OPTIONS": {
# 'init_command': "SET sql_mode='STRICT_TRANS_TABLES'",
# },
}
}
django使用mysql出现警告Warning: (3135, "'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release的更多相关文章
- django Warning: (3135, "'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes
django连接数据库配置设置如下 DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'test2', ...
- mysql处理警告 Warning: Using a password on the command line interface can be insecure.
vim /etc/mysql/my.cnf [mysqldump] user=user_name password=password 格式: [只用密码的命令] user=用户名 password=密 ...
- mysql中,ENCODE警告---Warning Code : 1287
mysql中,ENCODE警告 共 1 行受到影响, 1 个警告 执行耗时 : 0.072 sec传送时间 : 0.001 sec总耗时 : 0.073 sec Warning Code : 1287 ...
- 查看MySQL的警告信息
在王MySQL数据库导入数据的时候经常会出现警告,这些警告很容易被忽视,今天到数据的时候突然想看看警告的内容是什么,百度了一下mysql查看警告的命令 show warnings; 命令很简明,一查看 ...
- python——django使用mysql数据库(二)
上一篇中,我们已经讲述了如何初始化一个django数据库,这一章就来讲讲在实际的项目中如何使用我们初始化的数据库呢? 如还未进行初始化数据库操作,请参考python——django使用mysql数据库 ...
- python——django使用mysql数据库(一)
之前已经写过如何创建一个django项目,现在我们已经有了一个小骷髅,要想这个web工程变成一个有血有肉的人,我们还需要做很多操作.现在就先来介绍如何在django中使用mysql数据库. 前提:已经 ...
- Django ajax MYSQL Highcharts<1>
Another small project with django/Ajax/Mysql/Highcharts. 看下效果图 - delivery dashboard .嘿嘿 是不是还蛮好看的. 废 ...
- django 的mysql数据配置
原地址:http://blog.csdn.net/gamesofsailing/article/details/21465327 在成功安装python-mysql后,开始配置django的mysql ...
- FMDB警告Warning: there is at least one open result set around after performing的问题
FMDB操作sqlite的时候总是报警告Warning: there is at least one open result set around after performing,后来发现是执行查询 ...
随机推荐
- oracle 排序后分页查询
demo: select * from ( select * from DEV_REG_CFG_CAMERA where 1 = 1 order by unid asc) where rownum & ...
- NumPy 之 案例(随机漫步)
import numpy as np The numpy.random module supplements(补充) the built-in Python random with functions ...
- C#-Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046}
异常信息如下 捕获到执行这句时异常: Excel.Application ep = new Excel.ApplicationClass(); Retrieving the COM class fac ...
- python语言的堆栈与队列类的实现
基于python语言的数据结构之堆栈与队列的实现 # 堆栈的实现 # -*- coding: utf-8 -*- """ 栈(stack), 是一种容器,可以存入数据元素 ...
- 使用jmeter 设计流程发起测试
业务场景 需要实现用户在登录后,能够持续的发起流程. 需要注意的点: 1.使用不同的用户登录. 2.登录后发起可以持续的发起流程. 实现步骤 1.先使用badboy 录制脚本. 2.使用jmeter ...
- 一文弄懂Pytorch的DataLoader, DataSet, Sampler之间的关系
以下内容都是针对Pytorch 1.0-1.1介绍. 很多文章都是从Dataset等对象自下往上进行介绍,但是对于初学者而言,其实这并不好理解,因为有的时候会不自觉地陷入到一些细枝末节中去,而不能把握 ...
- xz格式解压
1.安装xz命令 yum install xz -y 2.将xz文件解压为tar文件 xz -d example.tar.xz 3.将tar文件解压 tar xf example.tar 如果无法安装 ...
- P5325 【模板】Min_25筛
题意:定义积性函数f(x)f(x)f(x),且f(p^k)=p^k*(p^k−1) (p是一个质数),求f(1)+f(2)+...f(n); 思路:板子题.重新打了一份装起来. /* 定义积性函数 ...
- 命令行创建react.js项目
npm install -g create-react-app /*搭建一个全局的脚手架*/ create-react-app my-demo /*创建项目 my-demo是项目名字* ...
- [Algorithm] 94. Binary Tree Inorder Traversal iteratively approach
Given a binary tree, return the inorder traversal of its nodes' values. Example: Input: [1,null,2,3] ...