Cannot Log In To Magento After Installing Sample Database

Asked By 0 points N/A Posted on -


Have anyone here trying to install Sample Database from Magento. Have you succeeded?

I have a fresh copy of Magento installed. Then I tried to download the sample database provided version 1.2. My Magento version is 1.5+.

I succeeded installing Magento previously, and I was able to log in to the Backend using admin account. But when I load a SQL file contains sample database provided from Magento site.

I was unable to log in to the Backend anymore using admin account. I'm sure that I don't mistype the password.

Any suggestion what's happened?


Invalid Username or Password.

Best Answer by DodieWurst
Best Answer
Best Answer
Answered By 0 points N/A #121684


In this case you need to make perfect relation for PHP page with SQL database. I am giving an example here:





mysql_connect($hostname,$user,$pass)or die ("dead 1");


mysql_select_db($db)or die ("dead 2");

You need to create a configure page and include it with all PHP pages.
You need to take care about three things. One is relation for PHP page with SQL database and other one is query in SQL database. And last one is condition. You have to give username and password in SQL database perfectly, and also field mane must have to be right.

Answered By 0 points N/A #121685

First Solution
In different forums I saw they mentioned connecting as http://localhost/magento/index.php/admin will fail but if you connect as it will work. But in my case IP address in the URL did not work too.

I made it work into whenever I changed my browser. Suppose I installed magento using Google chrome browser and I open admin url into my firefox window and it worked. Though in the firefox the url http://localhost/magento/index.php/admin did not work, but url worked fine.

Second Solution

Go to app/code/core/Mage/Core/Model/Session/Abstract/Varien.php file within your magento directory.

Find the code:


and replace with


After this save the file. And try to login into the admin.

I think it will work now.

Login/Register to Answer

Related Questions