I'm using Linux Mint 13 (Ubuntu 12.04 based) and trying to install a local development environment of a WordPress production project which right now is in an amazon EC2 instance.
First, I cloned WP project from its bitbucket repository.
After, I made a db environment backup with:
mysqldump -u root -p --lock-tables=false --all-databases > dump-$( date '+%Y-%m-%d_%H-%M-%S' ).sql
Then I imported it to my computer with:
scp my-server:~/db_backups/db_backup.sql ~/mylocalfolderforbackups
I installed the db environment backup in my local mysql with:
mysql -u root -p < db_backup.sql
My wp-config.php is filled as following (thought I don't know if my WP copy uses wp-config.php.prod instead):
define('DB_USER', 'root');
define('DB_PASSWORD', 'password'); (where I put the right password for root user)
define('DB_HOST', 'localhost');
define('WP_HOME', 'http://localhost');
define('WP_SITEURL', 'http://localhost');
I've restarted apache and mysql but when I try to access to http://localhost/my-project/ it returns "Error establishing a database connection". I don't find the issue... Do you have an idea? Thank you.