Results 1 to 8 of 8

Thread: Sync-ing dbs

  1. #1
    bagpiper is offline Sugar Community Member
    Join Date
    Dec 2004
    Posts
    10

    Question Sync-ing dbs

    Hi all,

    I've got a local SugarCRM and another one online. I'm using phpMyAdmin to export the local db data and then use it to import the data to the online db.

    So after 1/2 day of scratching my head and searching for answers I find that this procedure doesn't work...I can see the items on the "last viewed" bar. But no entries in the "List" format for a tab (in this case I'm using SugarCRM for bug tracking).

    This is the error I get (the application is truncating the error):

    Code:
    Error retrieving Bug list:  Query Failed:(  SELECT  meetings.id , meetings.name , meetings.status  , CONCAT(IFNULL(contacts.first_name,''),' ',IFNULL(contacts.last_name,'')) contact_name, '                                                                                                                                                                                                                                                              ' contact_name_owner , '                                                                                                                                                                                                                                                              ' contact_name_mod , meetings.date_start  , jt1.user_name assigned_user_name, meetings.time_start , meetings.assigned_user_id  , 'meetings' panel_name  FROM meetings   AND contacts.deleted=0  AND jt1.deleted=0 where ((meetings.status='Planned')) AND meetings.deleted=0 ) UNION ALL (  SELECT  tasks.id , tasks.name , tasks.status  , CONCAT(IFNULL(contacts.first_name,''),' ',IFNULL(contacts.last_name,'')) contact_name, tasks.date_due  as date_start  , jt1.user_name assigned_user_name, tasks.time_due  as time_start , tasks.assigned_user_id  , 'tasks' panel_name  FROM tasks   AND contacts.deleted=0  AND jt1.deleted=0 where ((tasks.status='Not Started' OR tasks.status='In Progress' OR tasks.status='Pending Input')) AND tasks.deleted=0 ) UNION ALL (  SELECT  calls.id , calls.name , calls.status  , CONCAT(IFNULL(contacts.first_name,''),' ',IFNULL(contacts.last_name,'')) contact_name, '                                                                                                                                                                                                                                                              ' contact_name_owner , '                                                                                                                                                                                                                                                              ' contact_name_mod , calls.date_start  , jt1.user_name assigned_user_name, calls.time_start , calls.assigned_user_id  , 'calls' panel_name  FROM calls   AND contacts.deleted=0  AND jt1.deleted=0 where ((calls.status='Planned')) AND calls.deleted=0 ) ORDER BY date_start  desc LIMIT 0,10::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 'AND contacts.deleted=0  AND jt1.deleted=0 where ((meetings.statu
    Can you provide with some clues as to what to do ?

    Your help is very well appreciated!

  2. #2
    sacramentojoe is offline Sugar Community Member
    Join Date
    Nov 2005
    Posts
    447

    Default Re: Sync-ing dbs

    what method are you using to copy / sync the DB's?

    phpMyAdmin has a "copy" function that usually works fine.

    if all else fails, you can use mysqldump from source and then re-import on the destination DB.

  3. #3
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: Sync-ing dbs

    In addition to Joe's comments, what version of MySQL are you using at each end?
    Regards,

    Angel Magaņa
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

  4. #4
    bagpiper is offline Sugar Community Member
    Join Date
    Dec 2004
    Posts
    10

    Question Re: Sync-ing dbs

    Thanks,

    Local MySQL is 5.0.41, Hosted MySQL is 4.1.20 (in a shared hosting environment).

    I tried using the insert, update and replace methods of phpMyAdmin, but I always end up getting an empty list when browsing a tab. I do get however the "last viewed" information. Also tried the My SQL version export to 4.0 in case I was exporting data in version 5 format.

    It would be great if I can get step by step instructions for using phpMyAdmin for synching...to summarize:

    - I have a local installation of Sugar (the database has data)
    - I made a remote installation of Sugar (the database has empty data)
    - I need to copy the local database to the remote one

    Thanks so much! I'm sure newcomers to SugarCRM will feel a sense of relief.


  5. #5
    bagpiper is offline Sugar Community Member
    Join Date
    Dec 2004
    Posts
    10

    Default Re: Sync-ing dbs

    One more update...I'm using mysqldump to regenerate the tables at the remote server and I'm in the same situation...no listing capabilities. Any help is greatly appreciated...

  6. #6
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: Sync-ing dbs

    Are you on a Windows based system? If so, take a look at using SQLyog (www.webyog.com). It has built in functionality that makes it very easy to copy tables from one database to another, including copying to remote servers.
    Regards,

    Angel Magaņa
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

  7. #7
    bagpiper is offline Sugar Community Member
    Join Date
    Dec 2004
    Posts
    10

    Default Re: Sync-ing dbs

    Thanks Angel,

    Yes indeed, I have a Windows system both locally and remote. I have not heard of SQLyog before

    My testing now involved creating a new database locally and installing a new instance of Sugar. As it turns out, using the same mysqldump script I used on my previous test for the remote database works as expected.

    So now I'm thinking may be there's something in the ftp transfer didn't work right...I see that when i log in to the remote server I get:

    Fatal error: main(): Failed opening required 'cache/dashlets/dashlets.php' (include_path='.;c:\php\pear') in d:\inetpub\ecotronics\crm\modules\Home\index.php on line 36

    Could this be the source of my headaches? When I click on a Last Viewed item, I get this error at the end of the page:

    Error retrieving Bug list: Query Failed SELECT meetings.id , meetings.name , meetings.status , CONCAT(IFNULL(contacts.first_name,''),' ',IFNULL(contacts.last_name,'')) contact_name, ' ' contact_name_owner , ' ' contact_name_mod , meetings.date_start , jt1.user_name assigned_user_name, meetings.time_start , meetings.assigned_user_id , 'meetings' panel_name FROM meetings AND contacts.deleted=0 AND jt1.deleted=0 where ((meetings.status='Planned')) AND meetings.deleted=0 ) UNION ALL ( SELECT tasks.id , tasks.name , tasks.status , CONCAT(IFNULL(contacts.first_name,''),' ',IFNULL(contacts.last_name,'')) contact_name, tasks.date_due as date_start , jt1.user_name assigned_user_name, tasks.time_due as time_start , tasks.assigned_user_id , 'tasks' panel_name FROM tasks AND contacts.deleted=0 AND jt1.deleted=0 where ((tasks.status='Not Started' OR tasks.status='In Progress' OR tasks.status='Pending Input')) AND tasks.deleted=0 ) UNION ALL ( SELECT calls.id , calls.name , calls.status , CONCAT(IFNULL(contacts.first_name,''),' ',IFNULL(contacts.last_name,'')) contact_name, ' ' contact_name_owner , ' ' contact_name_mod , calls.date_start , jt1.user_name assigned_user_name, calls.time_start , calls.assigned_user_id , 'calls' panel_name FROM calls AND contacts.deleted=0 AND jt1.deleted=0 where ((calls.status='Planned')) AND calls.deleted=0 ) ORDER BY date_start desc LIMIT 0,10::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 'AND contacts.deleted=0 AND jt1.deleted=0 where ((meetings.statu
    Last edited by bagpiper; 2007-08-21 at 06:51 PM.

  8. #8
    bagpiper is offline Sugar Community Member
    Join Date
    Dec 2004
    Posts
    10

    Default Re: Sync-ing dbs

    CASE CLOSED

    After sweating for the last 2 days...I'm happy to announce I solved the problem.

    The issue was that when I transfered the files (used FileZilla) apparently not all of the files got transferred.
    The luck was such that the files made the system work OK but it wasn't so.

    So thank you all for your help and tips. I'm now a new happy user of SugarCRM.

    CASE CLOSED

Thread Information

Users Browsing this Thread

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

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
  •