Creating testing local site from online production site I have tried to perform this action several times, only to find that I can never login to the previously created database when I setup my local environment. I have recently picked up the practice to have two sites: development and production, sometimes a third one in between.

Here is my process, maybe I am ommiting a step or two:


Create fresh local Database (same name as online) with PHPMyAdmin
Install Drupal 6 using this database
Setup Drupal installation
Import online Database backup onto new local installation
And here is where I get stuck everytime, with the dreaded:



  Access denied for user 'admin'@'localhost' (using password: YES)*


I have edited settings.php file to work from local to online, so I thought I understood how to do this process in reverse, but apparently I don't.

As a last resource, I have even changed admin's and other user's passwords directly in the database via PHPMyAdmin, and used these in settings.php so I might log in, but it just won't happen.
First, try to do the move the project to your server again but DO NOT go through the installation process. Simple add all the files to the proper directory then move in all the data. After that, just try going to the home page.

If that wasn't it I feel like you probably skipped giving 'admin'@'localhost' permission to access your db.

Try checking admin's priviledges in the MySQL console: 

mysql&gt; SHOW GRANTS FOR 'admin'@'localhost';


If admin doesn't have privileges, go into MySQL console and:


Create a user(if you don't have one made): mysql&gt;CREATE USER 'admin'@'localhost' IDENTIFIED BY 'apassword';
Now, give admin priviledges: mysql&gt;GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost'
Lastly, flush! mysql&gt;FLUSH PRIVILEGES;


Hope this fixes it!