
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
How to set sql_mode permanently in MySQL?
If you are using Windows Operating System, check your directory my.cnf or my.ini file.
mysql> select @@datadir;
The following is the output
+---------------------------------------------+ | @@datadir | +---------------------------------------------+ | C:\ProgramData\MySQL\MySQL Server 8.0\Data\ | +---------------------------------------------+ 1 row in set (0.00 sec)
Reach the above location ‘C:\ProgramData\MySQL\MySQL Server 8.0\Data\”. The screenshot is as follows for my.cnf file
Open the my.cnf file and write the sql_mode="TRADITIONAL". The syntax is as follows
sql_mode="TRADITIONAL".
After that start your server once again.
- Related Articles
- Set Database From Single User Mode to Multi User in SQL?
- Mean and Mode in SQL Server
- How to run SQL script in MySQL?
- In MySQL, how does the precedence of ! operator in comparison with NOT operator depends upon HIGH_NOT_PRECEDENCE SQL mode?
- How can we delete an existing MySQL event permanently?
- How to set a verbose mode in JShell in Java 9?
- How to create PowerShell alias permanently?
- How does the precedence of || operator depend on PIPES_AS_CONCAT SQL mode?
- How to set fullscreen mode for Java Swing Application?
- How to write a MySQL “LIMIT” in SQL Server?
- What is the use of ALLOW_INVALID_DATES SQL mode?
- What is the use of IGNORE_SPACE SQL mode?
- How to disable action bar permanently in Android?
- How can we set up a MySQL User account by using SQL GRANT statement?
- How Can we permanently define user-defined variable for a client in MySQL?

Advertisements