sh phpMyAdmin的设置默认空

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh phpMyAdmin的设置默认空相关的知识,希望对你有一定的参考价值。

Field 'id'(column name) doesn't have a default value and you are not passing any value in the INSERT query.

NOTE : you have to configure the database in order to handle this special case by default you have to pass any data if the column default is mentioned as none, if it is mentioned default as NULL then no need to do any thing.  

There are 2 solutions mentioned below:

Solution 1
MySQL is most likely in STRICT SQL mode. Try to execute SQL query SET GLOBAL sql_mode='' or edit your my.cnf / my.ini to make sure you aren't setting STRICT_ALL_TABLES and/or STRICT_TRANS_TABLES.

Solution 2
If Solution-1 is not working then try Solution-2 as given in below steps:

Run MySQL Administrator tool as Administrator.
Then go to Startup Variable.
Then go to the Advance tab.
find SQL Mode and remove the STRICT_ALL_TABLES and/or STRICT_TRANS_TABLES and then Click on Apply Changes.
Restart MySQL Server.
Done.
Note: I have tested these solutions in MySQL Server 5.7

以上是关于sh phpMyAdmin的设置默认空的主要内容,如果未能解决你的问题,请参考以下文章

phpmyadmin空密码登录

导入到 phpmyadmin 时如何设置空值?

xampp中修改mysql默认空密码

phpmyadmin出现空password登录被禁止

phpmyadmin出现空密码登录被禁止 (参见 允许空密码)的解决办法

xampp修改Mysql默认空密码