0
votes

I have a hosted drupal website (in zipped folder). I wish to copy it on localhost using XAMPP. I have extracted the website folder (which is "myFolderName") and copied it to C:/xampp/htdocs.

But when I type localhost/myFolderName, it gives

Site off-line
The site is currently not available due to technical problems. Please try again 
later. Thank you for your understanding.....
The mysql error was: Access denied for user 'newdb'@'localhost' (using password: YES)"

To overcome this, I checked the settings.php file and it had $db_url = 'mysql://newdb:mypass@localhost/newdb;

So I tried to create a new user named newdb with password mypass on a newly created database newdb. But how can I import database and remove that error I listed above ?

I searched the myFolderName folder for .sql files, there are no such files to import in xampp.

I have mysql user and password both of the hosted website and when I remote login (using ssh on ubuntu), then I see a few databases and many tables but I am unable to locate these in myFolderName folder.

I just want to change a few images, add a few links and paragraphs and some php scripts to my website by first trying it on localhost before doing it directly on the hosted drupal website.

Moreover, the hosted drupal interface( at aws.amazon.com )does not allow to change certain portions of my website as the original hosted website was made using both hardcoded html and other scripts along to drupal editing.

Please help me as I am very new to drupal and want to change on my localhost (XAMPP) using html and php codes rather than drupal interfaces.

1

1 Answers

0
votes

Finally, found it myself !

I used mysqldump -u newdb -p newdb > mydatabasefile.sql where the first instance of "newdb" was my username and the second instance of "newdb" was my database name. It prompted for a password which was "mypass" in my case.

Later, I imported this .sql file into my "newdb" database already created in xampp