当前位置:网站首页>Strict Mode for Databases
Strict Mode for Databases
2022-07-31 00:15:00 【Miracle_ze】
Strict mode for databases
Strict Mode
1. Introduction
The mysql database has strict mode, and there may be fields with default values that must be assigned values when sql is inserted, otherwise an error will be reported.
Version 5.7 defaults to strict mode, the way to insert into the user table to create a new user cannot be adjusted
2. Use the configuration file to enable and disable strict mode management [mysql service enabled]
1. Check if strict mode is enabled
1.linux [my.cnf file]
vim /etc/my.cnf
Strict mode:
sql-mode=NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Search for sql-mode If you can't find the previous content, it means non-strict mode
2.windows is my.ini
Strict mode: sql-mode=NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Search for sql-mode in the file if you can't find the previous content, it means non-strict mode
2. Turn off strict mode [my.cnf file], to enable delete statement
Search for the sql-mode keyword, if not, add a line at the end of the file
Replace with: sql-mode=NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTIO
3. Restart the service
Restart mysql
service mysql restart4. Enter mysql to refresh the permission table
flush privileges;边栏推荐
- Axure轮播图
- How to open the payment channel interface?
- Android安全性优化——APP加固
- Shell programming conditional statement test command Integer value, string comparison Logical test File test
- 写了多年业务代码,我发现了这11个门道,只有内行才知道
- ES6中 async 函数、await表达式 的基本用法
- pytorch的安装注意事项
- Shell编程条件语句 test命令 整数值,字符串比较 逻辑测试 文件测试
- 47. 【Pointers and Arrays】
- 神经网络(ANN)
猜你喜欢
随机推荐
从笔试包装类型的11个常见判断是否相等的例子理解:包装类型、自动装箱与拆箱的原理、装箱拆箱的发生时机、包装类型的常量池技术
HCIP Day 15 Notes
数据库的严格模式
【VisDrone数据集】YOLOV3训练VisDrone数据集步骤与结果
2022 China Logistics Industry Conference and Entrepreneur Summit Forum will be held in Hangzhou!
Axure轮播图
Soft Exam Study Plan
Unity 加载读取PPT
HCIP第十六天笔记
WebServer process explanation (registration module)
binglog日志追踪:数据备份并备份追踪
Dry goods | 4 tips for MySQL performance optimization
xss的绕过
网络常用的状态码
软件开发设计流程
binglog log tracking: data backup and backup tracking
A Brief Talk About MPI
flex-direction容器属性
在微服务中使用事件溯源的六大原因 - Herath
leetcode 406. Queue Reconstruction by Height 根据身高重建队列(中等)








