preserver Posted September 13, 2013 Share Posted September 13, 2013 (edited) I'm making a local copy of my remote site. I went to export my database from the remote server, but there were 6 databases, not one. I have not heard that there are supposed to be multiple databases for prestashop. Each one appears to contain unique tables. I exported them, but was unable to get import them successfully due to the large file size. I used bigdump, but it gave me this error message: Quote Error at the line 22: CREATE DATABASE `information_schema` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; Query: ----CREATE DATABASE `information_schema` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci MySQL: Access denied for user 'root'@'localhost' to database 'information_schema' The first of the databases was named information_schema, if that information is of any use. I did successfully get big dump to import one of the databases (that was on its own too big for a regular import). The local site was still routed to the remote site though. I think I'm supposed to change the ps_shop_url table, but that was not in the database that I downloaded. Is it ok to have multiple databases running for a single prestashop (with very large inventory)? If that is alright, can I export then import them to a single database as I tried to do? I think even a single one of the databases is so large, I will have to use big dump. But does anyone know what the big dump error means? Should I not export the information schema database? Should I import, then export each database individually to newly created empty databases? Edited October 8, 2013 by preserver (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted September 13, 2013 Share Posted September 13, 2013 You only have one database for your Prestashop store. information schema is a internal mysql database, you do not need to export this to create a local copy of Prestashop. The other 4 databases are likely for other stores, or perhaps wordpress blogs or other applications you have. To determine your Prestashop database name, open the file located at config/settings.inc.php and search for _DB_NAME_. This will tell you the database you need to export. 1 Link to comment Share on other sites More sharing options...
preserver Posted September 14, 2013 Author Share Posted September 14, 2013 Thanks for your response! I don't have anything else running on my site except for prestashop. I went back to check the databases on the live site. Looks like they have the same tables, but with different prefixes. I found which one the live site was using and used Big Dump to import it (since it was still too big for a standard import with phpmyadmin.) The import went alright and my site loaded when I entered the localhost/prestashop. (That's the name of the program files folder in htdocs.) However, it went to the url of my remote site. From reading on the forum, I thought I needed to change the domain name. I didn't know how to get to the back office of the local site, so I changed the shop_url table of the database. I did this (for the local db, of course), then when I pulled up localhost/prestashop the page said it was on an internal loop or something to that effect. I had to do some other stuff, but when I came back to the page and refreshed, it gave this error message: Link to database cannot be established: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it. So, I thought I would go back to the database and change it back to the old setting for shop_url. But when I tried to open localhost/phpmyadmin, it produced this message: My SQL said: #2002 - No connection could be made because the target machine actively refused it. The server is not responding (or the local server's socket is not correctly configured). Connection for controluser as defined in your configuration failed. Also, should I take down the other databases I have on my remote site? I used a series of csv uploads to get my inventory up, and swapped out some image files for smaller versions. I'm just throwing out ideas for why there would be 1, 2, and 3 versions of the database still up if the shop is using 4. There was a 'wor1' database listed after 4 (db that is in use) that looks like it has different content than the others, but is prestashop related. I guess I could always just back up the superfluous dbs, take them off the live site and see what happens. Any ideas about how to regain access to the local site or database? I should note that I don't have a local db password right now, somehow when I created the db, I didn't see an opportunity. Not sure if that would have anything to do with it. Link to comment Share on other sites More sharing options...
bellini13 Posted September 14, 2013 Share Posted September 14, 2013 you need to updated a few things when you move the store locally. 1) config/settings.inc.php. Make sure these are pointing to your localhost database, not the remote one _DB_SERVER_ _DB_NAME_ _DB_USER_ _DB_PASSWD_ 2) The shop URL in the database (you already did) 3) Delete the .htaccess file located in the prestashop folder on the localhost. It will get regenerated with the correct information Then try to log into the backoffice, navigate to SEO and URL page, and save the page and the .htaccess file will be re-created 1 Link to comment Share on other sites More sharing options...
preserver Posted September 15, 2013 Author Share Posted September 15, 2013 Thanks for your help! I deleted the htaccess files- there was one labeled old, and another one. When I try to login to the backoffice, I still get the same error message. I'm also still getting the same thing for the front end of the site and localhost/phpmyadmin. I don't know how to access the back office right now, so I haven't changed the SEO and URL settings, and hence the htaccess file hasn't regenerated. I noticed in the config/settings.inc.php file that it doesn't list a url, or domain name. I think I saw somewhere (amid my reading on the forum and various other postings) that there is supposed to be something like that after the DB prefix maybe. Here is the config/settings file for reference. Again, I have no password locally, so I haven't covered it with x's it just isn't there. I don't think that is a big security risk for my local host though, right? I have friendly urls enable, too, in case that has anything to do with it. <?php define('_DB_SERVER_', 'localhost'); define('_DB_NAME_', 'prestashop'); define('_DB_USER_', 'root'); define('_DB_PASSWD_', ''); define('_DB_PREFIX_', 'rus_'); define('_MYSQL_ENGINE_', 'InnoDB'); define('_PS_CACHING_SYSTEM_', 'CacheMemcache'); define('_PS_CACHE_ENABLED_', '0'); Thanks for helping me get to the bottom of this! Helen Link to comment Share on other sites More sharing options...
bellini13 Posted September 15, 2013 Share Posted September 15, 2013 I wouldn't advise having no password on localhost, but as long as you can log into phpmyadmin using root without password from a browser, then this should work ok. I wouldn't focus on the URL of the shop until after you can get past the database connection issue. Quote Link to database cannot be established: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it. If you are still receiving the above error, that means you have configured something incorrectly. If I were in your shoes, I would assign a password to root, adjust the PS settings file with the new password and try again Link to comment Share on other sites More sharing options...
preserver Posted September 16, 2013 Author Share Posted September 16, 2013 I have been reading about how to create a password for root in phpmyadmin and sql, but I have only found how to do it by accessing mysql or phpmyadmin. I can't or just don't know how to get into either with the error message showing up. How do I get to change the password for root while phpmyadmin is giving that error message? Link to comment Share on other sites More sharing options...
bellini13 Posted September 16, 2013 Share Posted September 16, 2013 you'll need to read up on 2 things 1) Read through the mysql install and configuration guides on how to set a password for a user 2) Read through the phpmyadmin install and configure guides on how to setup this software properly Since this is beyond the scope of Prestashop, you will really need to do this for yourself. Link to comment Share on other sites More sharing options...
preserver Posted September 25, 2013 Author Share Posted September 25, 2013 I reinstalled Xampp, set up the database password in phpmyadmin, and changed prestashop's config/settings.inc file accordingly (for new DB password). The htaccess file is still gone- probably because I already deleted it from prestashop's folder a while ago. The database is accessible, but the backoffice login page isn't accepting my password. I didn't change it from the onc I have for the production site on the remote server. Do I need to change a password or some other setting in the database in order to login to the back office? Link to comment Share on other sites More sharing options...
tomerg3 Posted September 25, 2013 Share Posted September 25, 2013 You need to have the same _COOKIE_KEY_ variable in /config/settings.inc.php as the original site, since that variable is used to encrypt / decrypt all the passowrds Link to comment Share on other sites More sharing options...
preserver Posted September 25, 2013 Author Share Posted September 25, 2013 I checked, and the _COOKIE_KEY_variable seems to be the same. I'm still not getting in though. Any other ideas. Thanks for the help. Link to comment Share on other sites More sharing options...
preserver Posted October 7, 2013 Author Share Posted October 7, 2013 (edited) I think I was just messing up the password. So it has now let me into the back office. Thank you! Edited October 8, 2013 by preserver (see edit history) Link to comment Share on other sites More sharing options...
prerana Posted October 30, 2014 Share Posted October 30, 2014 On 9/15/2013 at 9:51 PM, bellini13 said: I wouldn't advise having no password on localhost, but as long as you can log into phpmyadmin using root without password from a browser, then this should work ok. I wouldn't focus on the URL of the shop until after you can get past the database connection issue. If you are still receiving the above error, that means you have configured something incorrectly. If I were in your shoes, I would assign a password to root, adjust the PS settings file with the new password and try again Hi, I have updated my config file to the new password but I still receive the same error. Is there a table that I need to update in phpmyadmin? If yes, can you tell me the table name please? Thanks. Regards, Prerana 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