Access Denied For User Error. App/tygh/backend/database/mysqli.php On Line 40

My new shop 4.6.2 is working fine. Now I want to have another dummy shop to make any code changes or any other changes before applying on live shop. So I exactly mirrored another shop including database. New user, new database name, user and passwords are created and changed details accordingly in config.local.php

Now I can see red notice as 'Service the error shows as "Service Unavailable". Sorry, service is temporarily unavailable for both Shop and Admin panel sign-in.

When checked my error log, it shows as following:

PHP Warning: mysqli::mysqli(): (HY000/1045): Access denied for user 'testshop'@'localhost' (using password: YES) in /home/public_html/testshop/app/Tygh/Backend/Database/Mysqli.php on line 40

Is there any solution to solve this? Please help.

You should add permissions to testshop user. For example, use phpMyAdmin

Check the "Assigning privileges to user for a specific database" section

Many thanks eCom Labs, that worked.

You are welcome!