当前位置:网站首页>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 restart
4. Enter mysql to refresh the permission table
flush privileges;
边栏推荐
- A Brief Talk About MPI
- what is jira
- An easy-to-use interface testing tools - the Postman
- 46.<list链表的举列>
- xss靶机训练【实现弹窗即成功】
- .NET 跨平台应用开发动手教程 |用 Uno Platform 构建一个 Kanban-style Todo App
- How to use joiplay emulator
- How to import game archives in joiplay emulator
- Point Cloud Scene Reconstruction with Depth Estimation
- 神经网络(ANN)
猜你喜欢
[In-depth and easy-to-follow FPGA learning 14----------Test case design 2]
47.【指针与数组】
binglog日志追踪:数据备份并备份追踪
h264和h265解码上的区别
2022 China Logistics Industry Conference and Entrepreneur Summit Forum will be held in Hangzhou!
Homework: iptables prevent nmap scan and binlog
寄存器(汇编语言)
如何在WordPress网站上添加导航菜单
An easy-to-use interface testing tools - the Postman
How to solve the error of joiplay simulator
随机推荐
leetcode 406. Queue Reconstruction by Height 根据身高重建队列(中等)
封装、获取系统用户信息、角色及权限控制
天空云变化案例
宽客必备神器-AKShare
作业:iptables防止nmap扫描以及binlog
乌克兰外交部:乌已完成恢复粮食安全出口的必要准备
Linux 部署mysql 5.7全程跟踪 完整步骤 django部署
joiplay模拟器不支持此游戏类型怎么解决
H5跳转微信公众号解决方案
How to adjust Chinese in joiplay simulator
限制字符绕过
mysql 中手动设置事务提交
joiplay模拟器如何使用
【萌新解题】删除链表的倒数第 N 个结点
uni-ui安装
Machine Learning 1-Regression Model (2)
实验8(vlan实验)
pytorch双线性插值
MySQL面试题
正则表达式密码策略与正则回溯机制绕过