Jump to content

Trying to move from Live to Local, error linking to database


Recommended Posts

I'm trying to have a copy of a live website on my local machine. I'm doing this as a test as I'll have to move the website to a new hosting soon.

The problem is that at the end I just get this error : Link to database cannot be established: SQLSTATE[HY000] [2002] No such file or directory 

The steps I'm following are these:

  • Create a folder and connect MAMP to that folder.
  • Create a new database and a user for that db with all the permissions.
  • Import the live site DB into this new db.
  • Unpack my live site files in the MAMP directory
  • Find "settings.inc.php" and change the DB user and password details to match the newly created DB settings.
  • Delete everything inside of the smarty cache folder except for the index.php file.

 

Now when I go to the root I get the error that I mentioned. What am I doing wrong?

 

And I should add to the question, will those steps work to move my wesbite from one hosting to another? I'm following the steps in the Prestashop forum.

 

Edited by Sergi87 (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...