2

I use CiviCRM 4.5.8 with WordPress. I'd kinda like to try a newer version, but I don't want to mess up the production website. I used the WP plugin Duplicator to create a test site. I changed the civicrm.settings.php file and now I can maintain the CiviCRM database from either website. Then I tried to use phpMyAdmin to export the civicrm database with a new name. Then I used the DreamHost panel to create a database with that name. The phpMyAdmin import failed with a foreign key check error, so I turned that check off and started over with a new database name. I did the export, create database and import and now I get error "#1050 table civicrm_acl already exists". It's a fresh database, so that doesn't make sense. The database is 44M, so I suspect I'm having some sort of timeout/retry problem? I found Moving an Existing Installation to a New Server or Location, but the copying database part of it confuses me. 7.b. Substitute mysql_username, cms_db_name and dump_file_name_of_your_choice with appropriate values. My SQL experience was last century!

Another strategy, would be a fresh install of a newer version (what recent version would you recommend?). Then I'd have to export the data from 4.5.8 and import it into the new database. We just use the contact database and CiviMail. But wouldn't I lose all the groups, tags, notes, relationships, etc?

The third strategy would be to upgrade the test site and if it works well, I could use either use Duplicator to copy the test site to the production site or upgrade the production to the new version of CiviCRM. So many choices and none of them easy. Maybe I should just stick with good 'ol 4.5.8?? Thanks for any advice!!

2

Let me at least narrow some options for you:

The last idea of "sticking with 4.5.8." is not the way to go. The Long-Term Support (LTS) version currently is 4.6 (and for the foreseeable future as of writing, see this question about the LTS jump from 4.4 to 4.6). You will want to upgrade to at least that at some point (sooner rather than later since there are no more security updates for 4.5). See this question for more about LTS.

If you want to try the latest and greatest, 4.7 is the one to use. 4.6 is the more stable route.

2

I got it to work! Finally! Specifically, I was able to create a second civicrm database. I tried a variety of options using phpMyAdmin and got a variety of errors. Then I downloaded PuTTY http://www.putty.org/ so I could do SSH commands. Then I FTP'd the copy of the civicrm database up to the server. Then I used the SSH command: mysql -h<host> -u<user> -p<password> < yourfile.sql Note: no space after the -p

Finally, I changed civicrm.settings.php to point to the new database, did a little testing and it works!

1

Just so you know, I often times got that same error. The only way around it was to delete and recreate the database. It was like something was still there that I couldn't easily see in the screen I was on in PHPMyAdmin.

It seems to me in the past that I just would create a new database, go into PHPMyAdmin on the current database, go to the one tab (Operations?) and tell it to copy everything into that database. Exporting and importing always seems to cause a number of errors unless you add the code at the beginning and end of the database to tell it to not look at foreign key errors and such.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.