SquareEyes Posted December 10, 2010 Share Posted December 10, 2010 Hi - total newbie here in terms of Presta anyways :-)I have scoured the forum but can't seem to find a step-by-step to moving a presta store across from testing location to it's "real" URL. I get the idea that (maybe) I should first copy the files across, then change the config somehow, then copy the SQL database across but:1. I have no idea what config changes I need to make (I just read that somewhere in the forum)2. when I try to import the SQL database using PHPmyadmin in cpanel, I get a host of errors, namely:ErrorSQL query:---- Database: `weirdgee_Presta`---- ------------------------------------------------------------ Table structure for table `ps_access`--CREATE TABLE IF NOT EXISTS `ps_access` (`id_profile` int( 10 ) unsigned NOT NULL ,`id_tab` int( 10 ) unsigned NOT NULL ,`view` int( 11 ) NOT NULL ,`add` int( 11 ) NOT NULL ,`edit` int( 11 ) NOT NULL ,`delete` int( 11 ) NOT NULL ,PRIMARY KEY ( `id_profile` , `id_tab` )) ENGINE = MYISAM DEFAULT CHARSET = utf8;MySQL said: Documentation#1046 - No database selected Hope someone can help me dig my way out of this mess! 2 Link to comment Share on other sites More sharing options...
SquareEyes Posted December 12, 2010 Author Share Posted December 12, 2010 Can anyone guide me in the right direction here? 1 Link to comment Share on other sites More sharing options...
SquareEyes Posted December 14, 2010 Author Share Posted December 14, 2010 Please ... if I have missed the obvious solution (instructions) then please direct me to it, or otherwise support, thank you. Link to comment Share on other sites More sharing options...
mytheory. Posted December 14, 2010 Share Posted December 14, 2010 Are you moving servers or just pointing a new url to your "final" PS root dir folder?Essentially, you need to have a folder with all your PS files in it... or you can have to the files in the root of your directory. This will depend on your preference and possible your host or however you server is setup. Anyways, if you have a PS "test" folder that you now what to take "live" than just use that folder; leave all the files in that folder. Or if you want to keep a test version then copy the contents to a new folder that you will use as your "live" version. Then take your "new" domain and point it to your new server where your PS files are being hosted. Now this depends on how your server is setup... but if your host has a public_html file (or something similar) than chances are you have a subfolder that contains all your PS files that is under this folder. So by default... if you pointed your browser to http://www.mysite.com then it would point to this directory (public_html)... so by default to see your PS shop you need to point the browser to the PS subfolder, ie. http://www.mysite.com/prestashop. Now depending on your host, they might have a cPanel feature to specify this to automatically redirect all requests to public_html to your PS subdirectory which makes things easier, otherwise you will have to apply those settings using a .htaccess file.Now if you are moving to a new server, then on the new server you need to setup a new database and user with the appropriate privileges. Now with a new database, import your backup/dump SQL file. Make sure to have the new database selected before importing your backup file... from the error above, it seems like you haven't selected or specified a specific databse for the new data to be imported into.Once you have your files setup and your database imported... you need to change the configurations of your settings.inc.php file. You can find this file in /config/settings.inc.php. Changes the settings of this file to reflect the new changes (if any)... ie. if your database name, username and password are different on the new database you just created, make sure to specify this within this file. As a precaution, I changed the permissions on my config files to chmod 640.... not necessary but probably more secure.HTH! Link to comment Share on other sites More sharing options...
SquareEyes Posted December 14, 2010 Author Share Posted December 14, 2010 Thank you - this has definitely helped to clarify a few points I wasn't clear on and to help me know I am on the right track.I am moving whole store to a new server, not trying to point new domain at existing set up (if only!) I am currently waiting for my hosting reseller to fix the problem with my not being able to create a new database in cpanel. It lets me create it, says "ok all done" but actually it is not, and I was assuming that it was, therefore - not selecting a database (which didn't exist anyway!) to migrate the sql file into!!!Thank you, very helpful, hopefully I will get there.Also to other searchers later try this thread I finally found which is pretty useful for similar issues:http://www.prestashop.com/forums/viewthread/17724/I will update and mark solved when it is so :-) Link to comment Share on other sites More sharing options...
SquareEyes Posted December 15, 2010 Author Share Posted December 15, 2010 Now that I can actually create new sql databases, I am having he following issue:If import the SQL file into the new database without changing it at all (the file) I get the following error:MySQL said: Documentation#1044 - Access denied for user 'newusername'@'localhost' to database 'olddatabasename_Presta'So I changed the username inside the sql file to the new one, but then I get:MySQL said: Documentation#1007 - Can't create database 'newdatabasename_Presta'; database existsNote that I have at this stage selected the new database I have set up before importing.I then tried simply importing the same SQL file with a totally new name, which worked fine (it creates a new database) except that when I return to the MYSQL admin page it does not appear there for me to associate a user to it.To clarify:1. Do I need to make any changes within the SQL file I exported from the old website?2. Do I definitely CREATE a new database and then select it (in phpmyadmin) then import the SQL file?3. if so how do I stop it denying me access to old database (first error) or telling me it cannot create database as it is already there (2nd error)?Thank you for any help. Link to comment Share on other sites More sharing options...
SquareEyes Posted December 16, 2010 Author Share Posted December 16, 2010 OK after much headbanging: re-exported SQL file from original store, this time checked box next to "Add DROP TABLE / VIEW / PROCEDURE / FUNCTION" under "structure". Worked. I deserve beer... 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now