If you are seeing an error connecting to the database or the database connection error in Duplicator, then you likely entered incorrect information for your database connection.
Make sure that your database name, MySQL username, and password are correct. Some web hosting companies do not use localhost as the host for their MySQL servers. If this is the case, then you will need to ask your web host’s support staff to provide you with the correct information.