Results 1 to 3 of 3

Thread: New Fields Won't Save, MySQL ERROR 7

  1. #1
    joshr84 is offline Junior Member
    Join Date
    Jun 2011
    Posts
    1

    Default New Fields Won't Save, MySQL ERROR 7

    I'm having issues with new fields in the contacts table. The fields appear in the edit and detail views but when I edit them the changes aren't saved. I tried doing a Quick Repair and Rebuild and got this script under "Differences found between database and vardefs":
    Code:
    /*Checking Custom Fields for module : Contacts */
    /*MISSING IN DATABASE - emergency_contact_name_1_c -  ROW*/
    alter table contacts_cstm add column emergency_contact_name_1_c varchar(255)  NULL ;
    /*MISSING IN DATABASE - emergency_contact_name_2_c -  ROW*/
    alter table contacts_cstm add column emergency_contact_name_2_c varchar(255)  NULL ;
    /*MISSING IN DATABASE - emergency_contact_number_1_c -  ROW*/
    alter table contacts_cstm add column emergency_contact_number_1_c varchar(255)  NULL ;
    /*MISSING IN DATABASE - emergency_contact_number_2_c -  ROW*/
    alter table contacts_cstm add column emergency_contact_number_2_c varchar(255)  NULL ;
    /*MISSING IN DATABASE - birthday_c -  ROW*/
    alter table contacts_cstm add column birthday_c date  NULL ;
    /*MISSING IN DATABASE - employment_start_date_c -  ROW*/
    alter table contacts_cstm add column employment_start_date_c date  NULL ;
    I executed that and it said: Database failure. Please refer to sugarcrm.log for details.

    Went to the log and found this line: 06/22/11 15:24:39 [3008][58b75b52-11c1-a219-5e04-4d92215b6e8f][FATAL] MySQL error 7: Error on rename of '.\sugarcrm\contacts_cstm.MYI' to '.\sugarcrm\#sql2-8ec-12.MYI' (Errcode: 13)

    Any help understanding what could cause this would be GREATLY appreciated. Thanks!
    Last edited by joshr84; 2011-06-22 at 08:26 PM.

  2. #2
    rafael.q.g@hotmail.com's Avatar
    rafael.q.g@hotmail.com is offline Sugar Community Member
    Join Date
    Jun 2011
    Location
    Florianópolis - Brazil
    Posts
    782

    Default Re: New Fields Won't Save, MySQL ERROR 7

    The error when you try to save the field is happens because the columns: emergency_contact_number_2_c, emergency_contact_number_1_c, and the others are not on table created contacts_cstm.

    The error that happens on repair/rebuild could be some database/table limitation on your mysql server, like space, access rights, or some other limitation.

    If reading the logs you are not able to solve the issue from repair/rebuild, a possible way to solve it (not very elegant) is to create this columns directly on your database. Then when you save these fields from your edit view, probably no error will happen anymore and the input values will be saved.
    Rafael Queiroz Gonçalves
    Advanced OMG UML Certified Professional
    Sun Certified Enterprise Architect for the Java Platform
    Sun Certified Programmer for the Java 2 Platform
    IBM Certified Advanced Application Developer - Lotus Notes and Domino
    IBM Certified Application Developer - IBM WebSphere Portlet Factory
    Computer Science Mastering / UFSC - PPGCC

  3. #3
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,183

    Default Re: New Fields Won't Save, MySQL ERROR 7

    The error 7 isnt the important part, it's the error 13 at the end

    Code:
    kbrill@kbrill-Latitude-D630:/opt/lampp$ bin/perror 13
    OS error code  13: Permission denied
    It means that mysql didnt have full permissions on that file. Check your permissions and you should be able to fix this one.

    Once its fixed then run the repair and it will add the fields to the table.
    Kenneth Brill - Help Forum Moderator

    I do not respond to 'Private Messages'. Please email me directly instead

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. MySQL Error when updating custom fields
    By michel.d in forum Developer Help
    Replies: 1
    Last Post: 2010-01-11, 12:34 PM
  2. Replies: 0
    Last Post: 2008-02-06, 11:09 PM
  3. Replies: 8
    Last Post: 2007-04-16, 05:45 PM
  4. Replies: 1
    Last Post: 2007-01-30, 11:34 AM
  5. Session save path and MySQL problem
    By wattscj in forum Help
    Replies: 0
    Last Post: 2006-06-30, 08:44 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •