Windows
1. Go to Services and stop the MySQL service.
2. Go to C:\ProgramData\MySQL\MySQL Server <version>.
3. Take a backup of the existing my.ini file.
4. Open notepad in administrator mode and go to File -> Open and select the C:\ProgramData\MySQL\MySQL Server <version>\my.ini file.
5. Comment the existing sql-mode line and add the below sql-mode line.
sql-mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"
6. Go to File -> Save as
- Change Save as type to All files.
- Change Encoding to ANSI.
- Click Save.
7. Go to Services and start the MySQL service.
Linux
1. Stop the MySQL service.
2. Take a backup of the existing my.cnf or my.ini file.
3. Locate the MySQL configuration file: The MySQL configuration file is typically named my.cnf or my.ini and is located in the MySQL installation directory or in the /etc directory. Use the following command to search for the file.
sudo find / -name my.cnf
4. Open the MySQL configuration file: Once you locate the MySQL configuration file, open it using a text editor.
5. Comment the existing sql-mode line and add the below sql-mode line.
sql-mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"
6. Save the changes and start the MySQL services.
Comments
0 comments
Please sign in to leave a comment.