Transferring an Sql file

Permalink
I've just created my first site and I'm having a problem with transferring content. I first spent time learning C5 by setting up a localhost setup on my Computer. I'm actually developing two sites, so I setup my local development with multiple C5 installs, each with their own "root". I just change the apache-config file to switch between. In my localhost environment, I have no problem doing DB backup/restores with simple command-line functions with MySQLdump and MySQL utilities. I've had no problem moving C5 contents from one database to another.

Now for my problem. Instead of FTP'g all the files from my localhost site, I installed a fresh copy of C5 and performed a standard install. The MySQL db was setup per the Website utility provided.
I setup my themes files, and the production site looks just like my dev version - minus any content and minus the additional pages I created on my development site.

I've tried two methods to initialize the content of the website. First I did a C5 DB backup from my localhost site and transferred that file to the website.

On the Website, performing a C5 restore yields no content or the site-pages. I expected this to be in the SQL database file I restored. And yes I've turned off and cleared cache.

Next, I did a "mysqldump" and created an SQL file copy of the development DB. On the Website, I used the utility PhpMyAdmin and imported that file. Everything went Ok. But sill no content.
I've searched the C5 site for possible clues, but most of the write-ups focus on just moving C5 from one site to another.

Does anyone have an ideas where I'm going wrong?

 
tdpss555 replied on at Permalink Reply
Have more info on this problem.

I downloaded a copy of the Website. I then exported a copy of the Sql database. I then made the minor changes to site.php to reflect the config difference.

Then I created the database, using same name as Website and attempted to perform a restore with the DB file I exported.

i.e. "MYSQL -u root -p tdpss_c5 < tdpss_c5.sql"
This yielded the following error.

ERROR 1062 (23000) at line 200: Duplicate entry '1' for key 'PRIMARY'

I then performed a restore on my local sytem with the same DB file I had used to initialize content on the Website, and it loaded OK.
Also, starting up C5 locally is OK, all the content is there.

My conclusion is, that since I now have a complete local copy of C5 that I installed at the Website, and a DB that originates from my local site functions Ok, that something is amiss with the WebSite MySQL setup. Possibly a version issue.

I know the way around this is to just enter the Content directly, but that is a lot of work and I'm too inquisitive to let a problem go unsolved.

I plan to reset the database on the Website, then load some content, then see if exporting that DB still causes problems locally. In addition, will check what versions are involved.
-Dennis