I came across your question. I can help you in resolving it.
When the Mysql service is stopped then such error normally occurs so please check if it is running or not.
Please try to use "root" as your username and try to use empty as your password also try to use "joomla" as your database name.
You can also cross check if you have assigned your username which you have created in the PHPmyAdmin to your actual database or not.
You can also try to replace the localhost by 127.0.0.1
Usually we just try do the copy and paste the database name and username it is not correct
As sometimes the server setting may provide a prefix before a database name or the username such as the empty space and it is always different from your typed databse or username and we dont realize the difference as it is just the empty space.
Hope it fixes your issue.