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.


1 Answer 1


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

  • 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?
    – user888
    Dec 22, 2021 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.