Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to remove strict Mode by mysql in linux

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Today Xiaobian to share with you is how to remove strict mode in mysql in linux, many people do not know much, today Xiaobian in order to let you know more about mysql in linux to remove strict mode method, so give you a summary of the following content, look down together. I'm sure you'll find something.

1. Find mysqld

$ which mysqld/usr/sbin/mysqld

2. Find my.cnf location

$ /usr/sbin/mysqld --verbose --help | grep -A 1 'Default options'/etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf

Open/etc/my.cnf with vim

$ vim /etc/my.cnf

4. Modify the configuration and delete the STRICT_TRANS_TABLES.

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

If not, add it directly.

sql_mode=NO_ENGINE_SUBSTITUTION

5. Restart mysql

$ service mysqld restart

After modification, such as some tips, such as:

ERROR 1364 (HY000): Field 'name' doesn't have a default value

It wouldn't have prompted.

The above is how mysql in linux to remove the strict mode of the details of the content, after reading whether there is any harvest? If you want to know more, welcome to the industry news!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report