I installed Drupal, but for some reason lost the installation box and was not able to login so I reinstalled Drupal and was wondering how can I use my old database.

Comments

cgrim29588’s picture

Help needed ASAP!!

deciphered’s picture

If you are talking about an exact reproduction of the Drupal filesystem from your old site, then you should simply be able to import your backed up database using something like phpMyAdmin.

If you have created a new site install and configured certain aspects differently, the way I would go about it would be to do a Compare/Merge of the two databases using a tool like WinMerge (windows) or Changes (Mac), however, if you are not 100% certain that you know what you are doing, this may not be your best solution.

If I'm completely on the wrong track with what you are after, then please elaborate on your issue.

Cheers,
Deciphered.

cgrim29588’s picture

How do I do both of these?

vm’s picture

re-read the comment, It's been explained how you do the tasks and what tools to use.

mtsanford’s picture

what do you mean "lost the installation box"?

When you reinstalled, why didn't you give it the same database/user/password as before? You can still edit your sites/default/settings.php and change the settings for the database so that it uses your old database.

cgrim29588’s picture

I am not fimilar with phpMyAdmin or do I know what to change in settings.php

vm’s picture

phpmyadmin documentation is available on the phpmyadmin site. Your host may also have documentation available on how to back up your database. There are quite a few tutorials on the internet that can be found using google. There are also videos that can be found as well.

settings.php find the line $db_url it is there that your DB location, DB username and DB password are located. The line should be recognizable as you will see your current information for the previous installation.

mtsanford’s picture

in settings.php the line that looks like this

$db_url = 'mysqli://USERNAME:PASSWORD@HOSTNAME/DATABASENAME';

cgrim29588’s picture

Okay I found it, here is what it looks like:

* Database URL format:
* $db_url = 'mysql://username:password@localhost/databasename';
* $db_url = 'mysqli://username:password@localhost/databasename';
* $db_url = 'pgsql://username:password@localhost/databasename';
*/
$db_url = 'mysql://XXX:XXX@localhost/XXX';
$db_prefix = 'dr_';

The only problem is I don't know what the password was for the old database since it was installed using Softaculous Installer (http://www.softaculous.com/)

vm’s picture

where is the old settings.php?

have you worked your way through your host panel to locate the necessary information?

cgrim29588’s picture

IDK where the old settings.php is i'll look for it.

deciphered’s picture

I would strongly suggest editing that post and removing your password.

vm’s picture

I should have taken care of that earlier for the user. I've replaced with XXX's

cgrim29588’s picture

Thanks and I didn't find my old settings.php

vm’s picture

if you don't know your old databases password there isn't much you can do. Certainly nothing the drupal community can do.

Check with your host.

cgrim29588’s picture

I'm going to I'll put a support ticket into my host maybe they can help me. Thanks for everyones help anyways.