Can't restore database after moving from localhost
Hello,
I looked for my solution to no avail.
I made a customized site on my localhost, then did a backup of my db using phpmyadmin.
I then uploaded my customized files to the server and did the install.
However it looks like the generic version of my zencart see here: www.kinectwebdesign.com/zencart
I tried to import the db backup I made from local machine but I get an
Error
SQL query:
CREATE DATABASE example;
MySQL said: Documentation
#1044 - Access denied for user 'example'@'localhost' to database 'example'
I have figured out from reading this post that my server db has a prefix and my localhost db doesn't. http://www.inmotionhosting.com/suppo...-error-message
that I have to edit the zencart.sql file.
Here's my problem, the db backup I made on localhost via phpmyadmin, exported it and it looks compressed.
It looks like gobbledegook. Too confusing to edit, so how will I be able to restore the database?
Can can I get a normal looking db back up from localhost phpmyadmin.
This has stumped me for 2 days.:frusty:
Any help greatly appreciated.
Re: Can't restore database after moving from localhost
Quote:
Originally Posted by
Annie_zaz
Can can I get a normal looking db back up from localhost phpmyadmin.
As you have observed, the file you exported was compressed. There is a setting in the phpmyadmin window that will let you export the data in uncompressed format.
Alternatively, you can use your favourite zip/bzip/gzip program to decompress the file so that you can make the needed edits.
(you don't need to re-zip in order to import).
Another option (better for the long term) is to rename the tables of your local installation so they match what you need for the server. This way importing/exporting from one to the other is a breeze. Just make sure you change your local configuration files to match the database changes.
Cheers
Rod
Re: Can't restore database after moving from localhost
Ok Rod will give it a go now, I'll let you know how I go !
Thanks for the advice.:smile:
Re: Can't restore database after moving from localhost
Quote:
Originally Posted by
Annie_zaz
Ok Rod will give it a go now, I'll let you know how I go !
Thanks for the advice.:smile:
FIXED :smile:
Ok, for anyone with this same problem I had made a database backup on my local machine using phpmyadmin.
It was compressed but I uploaded it to the 'live server' and edited it there via my hosts code editor and it looked normal.
(I did try this the previous night and it didn't work for some reason :huh: and had wasted time trying to edit via notepad and it looked compressed there too:huh:)
I just made the database name the same as the new database that I created before transferring the files over and it worked.