can update but can't insert on mysql
Posted: Mon Jan 08, 2018 4:50 am
I can do UPDATES on the admin_default database in mysql. But I can't do INSERTs. Again, I have a database of users with many fields such as name, age, height, etc. Everything worked well on my local development server, but in production I can only do updates/changes to the database but not create new records with INSERT statements.
********EDIT****************
FIXED MY OWN PROBLEM:
This is caused by the STRICT_TRANS_TABLES SQL mode.
Open phpmyadmin and goto More Tab and select Variables submenu. Scroll down to find sql mode. Edit sql mode and remove STRICT_TRANS_TABLES Save it.
My local phpmyadmin settings were different than the settings for phpmyadmin up at my new server. ... Note that to made the configuration changes above I needed to login as root at phpmyadmin ...
It seems that now this STRICT_TRANS_TABLES setting exists by default and you have to remove it. The mysql/phpmyadmin that previously was installed by default with vesta was different. So when doing INSERT statements you would have to be a bit more careful. I don't want it so i got rid of it.
********EDIT****************
FIXED MY OWN PROBLEM:
This is caused by the STRICT_TRANS_TABLES SQL mode.
Open phpmyadmin and goto More Tab and select Variables submenu. Scroll down to find sql mode. Edit sql mode and remove STRICT_TRANS_TABLES Save it.
My local phpmyadmin settings were different than the settings for phpmyadmin up at my new server. ... Note that to made the configuration changes above I needed to login as root at phpmyadmin ...
It seems that now this STRICT_TRANS_TABLES setting exists by default and you have to remove it. The mysql/phpmyadmin that previously was installed by default with vesta was different. So when doing INSERT statements you would have to be a bit more careful. I don't want it so i got rid of it.