Can't log in to Drupal instance after duplicating database I wrote a quick script to pull down a live drupal database on to a machine on a local network, and that works fine.

I also made a copy of the actual Drupal instance on my own machine.

I edited settings.php to use the db on the network, and everything appears to be working correctly when I run the site from localhost, except I can't log in.

At first I thought I should just change the password directly using MySQL, but that didn't work. Then I tried running update.php, which also didn't work.

I'm stuck, why won't it accept the username/password? I have double checked that I'm using the correct login credentials on the live site, and it works fine.

Edit: The site was duplicated from a Linux server onto a Windows 7 machine, if that makes any difference.
First check whether $cookie_domain is set to localhost or not?

If it is set as the URL of the live site then it might not work. I faced this issue previously.

Other cause might be clean urls. You can check whether clean URL is enabled in your localhost or not.

You can check whether mod_rewrite is on or not here. If clean url is causing problem then you can disable from your database. If you want to disable clean url goto your database find variables table, find clean_url variable and set it to 0.