Home > Database > Mysql Tutorial > body text

Here are a few question-based titles that fit your article: * How to Manage MySQL Strict Mode in Localhost (XAMPP) * Enabling and Disabling Strict Mode in MySQL on XAMPP * Checking and Modifying MySQ

Barbara Streisand
Release: 2024-10-27 09:04:03
Original
881 people have browsed it

Here are a few question-based titles that fit your article:

* How to Manage MySQL Strict Mode in Localhost (XAMPP)
* Enabling and Disabling Strict Mode in MySQL on XAMPP
* Checking and Modifying MySQL Strict Mode Settings on Your Localhost
* MySQL Strict

MySQL Strict Mode Management in Localhost (XAMPP)

In this concise guide, we will unravel the intricacies of managing MySQL strict mode within a localhost environment (XAMPP).

Querying the Strict Mode Status

To determine if MySQL strict mode is enabled in localhost, execute the following SQL command:

SHOW VARIABLES LIKE 'sql_mode';
Copy after login

If any of the returned values include "STRICT_TRANS_TABLES," strict mode is active. If not, it is disabled.

Disabling Strict Mode

To disable strict mode, run the following SQL statement:

set global sql_mode='';
Copy after login

This command removes all active SQL modes, including strict mode, and sets it to an empty string.

Alternatively, you can disable specific modes other than STRICT_TRANS_TABLES, ensuring that strict mode remains inactive. For instance:

set global sql_mode='NO_ENGINE_SUBSTITUTION';
Copy after login

Enabling Strict Mode

To re-enable strict mode, execute the following SQL:

set global sql_mode='STRICT_TRANS_TABLES';
Copy after login

This command explicitly sets strict mode and deactivates all other modes.

The above is the detailed content of Here are a few question-based titles that fit your article: * How to Manage MySQL Strict Mode in Localhost (XAMPP) * Enabling and Disabling Strict Mode in MySQL on XAMPP * Checking and Modifying MySQ. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!