content_image/841012.jpg
## 5.1.11 Server SQL Modes 

• Threads_running 

The number of threads that are not sleeping. 

• Uptime 

The number of seconds that the server has been up. 

• Uptime_since_flush_status 

The number of seconds since the most recent FLUSH STATUS  statement. 

The MySQL server can operate in different SQL modes, and can apply these modes differently for different clients, depending on the value of the sql_mode  system variable. DBAs can set the global SQL mode to match site server operating requirements, and each application can set its session SQL mode to its own requirements. 

Modes affect the SQL syntax MySQL supports and the data validation checks it performs. This makes it easier to use MySQL in different environments and to use MySQL together with other database servers. 

•Setting the SQL Mode 

•The Most Important SQL Modes 

•Full List of SQL Modes 

•Combination SQL Modes 

•Strict SQL Mode 

•Comparison of the IGNORE Keyword and Strict SQL Mode 

For answers to questions often asked about server SQL modes in MySQL, see Section A.3, “MySQL 8.0 FAQ: Server SQL Mode” . 

When working with InnoDB  tables, consider also the innodb_strict_mode  system variable. It enables additional error checks for InnoDB  tables. 

## Setting the SQL Mode 

The default SQL mode in MySQL 8.0 includes these modes: ONLY_FULL_GROUP_BY , STRICT_TRANS_TABLES , NO_ZERO_IN_DATE , NO_ZERO_DATE , ERROR_FOR_DIVISION_BY_ZERO , and NO_ENGINE_SUBSTITUTION . 

To set the SQL mode at server startup, use the --sql-mode=" modes "  option on the command line, or sql-mode=" modes "  in an option file such as my.cnf  (Unix operating systems) or my.ini  (Windows). modes  is a list of different modes separated by commas. To clear the SQL mode explicitly, set it to an empty string using --sql-mode=""  on the command line, or sql-mode=""  in an option file. 

<img src='content_image/841012.jpg'>

## Note 

MySQL installation programs may configure the SQL mode during the installation process. 

If the SQL mode differs from the default or from what you expect, check for a setting in an option file that the server reads at startup. 

