Score:0

Can't import sql dump file from the live site (trying to create a development site)

ph flag

I am trying to create a development site which I can work on. So far, I have done:

  1. creating a backup.sql using drush sql-dump > backup.sql
  2. coping and pasting the live site folder for the development site folder
  3. in the new project folder (dev site one) I copied, I changed the db name,username, and password, then tried to import the database dump file by drush sql-query --file=backup.sql

From step 3, after running the command, I am getting [error] File(s) not found: backup.sql , even after trying to clear the cache by drush cr, I get SQLSATE[HY000] [1045] ACCESS DENIED FOR user ''@'localhost' (using password: YES)

It's really frustrating me because I have been trying to debug this for all day today. Would anyone be able to help me? I even changed the permission of the backup.sql and still cannot figure out why.

Thank you in advance.

Score:2
de flag

That error almost always means your connection information for your database is incorrect. check the database username, password, and database name in settings.php.

user888 avatar
ph flag
Thank you for your reply. I did change the name of the db, username, and password for the development site folder. Is it why? I followed the tutorial and that's what they did?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.