Database Failure: MySQL error 1064

Hi All,

I am getting Error: “MySQL error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use.”

I am getting this error, when I try to create/edit any details on SuiteCRM.

It also is not picking my User Id for any records created.

Please advice

Thanks

Hi,

Please ensure that your Permissions and Owner/Group User are set correctly.
Then, please run a Quick Repair/Rebuild and Execute any changes provided. Afterwards, try creating/editing again.

If this does not work, does your sugarcrm.log or suitecrm.log show any error messages?

Thanks, John

Hi John,

Thanks for the reply.

I tried your suggestion, its still a no go

Error Log:

Mon Aug 31 15:59:34 2015 [218885][-none-][FATAL] Configuration variable date.timezone is not set, guessed timezone UTC. Please set date.timezone=“UTC” in php.ini!
Mon Aug 31 15:59:38 2015 [218885][-none-][FATAL] Configuration variable date.timezone is not set, guessed timezone UTC. Please set date.timezone=“UTC” in php.ini!
Mon Aug 31 15:59:51 2015 [218885][-none-][FATAL] Configuration variable date.timezone is not set, guessed timezone UTC. Please set date.timezone=“UTC” in php.ini!
Mon Aug 31 15:59:56 2015 [218885][-none-][FATAL] Configuration variable date.timezone is not set, guessed timezone UTC. Please set date.timezone=“UTC” in php.ini!
Mon Aug 31 16:00:13 2015 [218885][-none-][FATAL] Configuration variable date.timezone is not set, guessed timezone UTC. Please set date.timezone=“UTC” in php.ini!
Mon Aug 31 16:00:37 2015 [218885][-none-][FATAL] Configuration variable date.timezone is not set, guessed timezone UTC. Please set date.timezone=“UTC” in php.ini!
Mon Aug 31 16:00:39 2015 [218885][-none-][FATAL] Configuration variable date.timezone is not set, guessed timezone UTC. Please set date.timezone=“UTC” in php.ini!
Mon Aug 31 16:00:46 2015 [218885][-none-][FATAL] Configuration variable date.timezone is not set, guessed timezone UTC. Please set date.timezone=“UTC” in php.ini!
Mon Aug 31 16:00:50 2015 [218885][-none-][FATAL] Configuration variable date.timezone is not set, guessed timezone UTC. Please set date.timezone=“UTC” in php.ini!
Mon Aug 31 16:00:51 2015 [218885][-none-][FATAL] Configuration variable date.timezone is not set, guessed timezone UTC. Please set date.timezone=“UTC” in php.ini!
Mon Aug 31 16:01:01 2015 [218885][-none-][FATAL] Configuration variable date.timezone is not set, guessed timezone UTC. Please set date.timezone=“UTC” in php.ini!
Mon Aug 31 16:01:10 2015 [222227][-none-][FATAL] Configuration variable date.timezone is not set, guessed timezone UTC. Please set date.timezone=“UTC” in php.ini!
Error updating table: accounts: Query Failed: UPDATE accounts
SET name=‘MAQ Software’,date_modified=‘2015-08-31 16:01:10’,modified_user_id=‘1’,created_by=‘1’,description=NULL,assigned_user_id=‘1’,account_type=NULL,industry=‘Technology’,annual_revenue=NULL,phone_fax=NULL,billing_address_street=NULL,billing_address_city=NULL,billing_address_state=NULL,billing_address_postalcode=NULL,billing_address_country=NULL,rating=NULL,phone_office=NULL,phone_alternate=NULL,website=‘http://www.maqsoftware.com/Contactus’,ownership=NULL,employees=NULL,ticker_symbol=NULL,shipping_address_street=NULL,shipping_address_city=NULL,shipping_address_state=NULL,shipping_address_postalcode=NULL,shipping_address_country=NULL,parent_id=’’,sic_code=NULL,campaign_id=’’,company_description=NULL,=NULL,company_products_and_services=NULL,=NULL,=NULL,company_phone=’+91 22 6696 271’,=NULL
WHERE accounts.id = ‘ee755804-5183-10ba-cc66-55ddcf7980ab’ AND deleted=0: MySQL error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘=NULL,company_products_and_services=NULL,=NULL,=NULL,company_phone=’+91 22 6696 ’ at line 2

I am no developer, I tried searching for any solutions online before posting for help. I understand its a MySQL syntax error, post that its incomprehensible to me.

Please advice.

Thanks

Hi,

If you have recently deleted a field then please check that all traces of it are removed, such as Edit view/ Detail View layouts and do a Quick Repair/Rebuild

If that doesn’t work;
If you go to the directory: /custom/Extension/modules/Accounts/Ext/Vardefs/ and inspect the files there.
If there are any references to fields that don’t exist in Studio in the filenames or in the vardefs.php file in the same directory, comment them out.
Then do a quick Repair/ Rebuild

Regards, John

Hi John,

Thanks for the reply. I havent deleted any fields, still, just to be sure, I checked if there were any references to any deleted fields in the Views as well as the directories, still no go.

Please advice.

Thanks

Hi,

Could anyone guide me to resolve the Database Failure error?

I have tried the suggestions listed by John, the error is still persisting.

Thanks

Hi,

What is your instance running? Is it Linux or Windows?

Also, If you find your config.php file and look for

default_permissions' => 
  array (
    'dir_mode' => ,
    'file_mode' => ,
    'user' => '',
    'group' => '',
  ),

What values are these set to?

Hi,

I am also getting Database failure error for insert, update and select in Apache 2.4.

Below are the values for the default_permissions array in config.php
‘default_permissions’ =>
array (
‘dir_mode’ => 1533,
‘file_mode’ => 509,
‘user’ => ‘’,
‘group’ => ‘’,
),
Please any one help me to resolve this issue.