Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion
  • Search

can update but can't insert on mysql

General questions about VestaCP
Post Reply
  • Print view
Advanced search
3 posts • Page 1 of 1
robinsouthchina
Posts: 11
Joined: Wed Apr 12, 2017 5:02 am

can update but can't insert on mysql
  • Quote

Post by robinsouthchina » 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.
Last edited by robinsouthchina on Mon Jan 08, 2018 6:51 am, edited 2 times in total.
Top

ScIT
Support team
Posts: 617
Joined: Mon Feb 23, 2015 4:13 pm

Os: Ubuntu 17x
Web: apache + nginx
Re: Unknown system variable 'a' -> I get this error when I try to INSERT
  • Quote

Post by ScIT » Mon Jan 08, 2018 6:37 am

this sounds more like a problem in your code, not in vestacp or mysql. for example have a look here: https://stackoverflow.com/questions/136 ... m-variable
Top

robinsouthchina
Posts: 11
Joined: Wed Apr 12, 2017 5:02 am

Re: Unknown system variable 'a' -> I get this error when I try to INSERT
  • Quote

Post by robinsouthchina » Mon Jan 08, 2018 6:50 am

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.
Top


Post Reply
  • Print view

3 posts • Page 1 of 1

Return to “General Discussion”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password