Fail to establish database connection

I did a backup for my client’s website for both the web files and sql. Now, I am trying to restore it to my cpanel. I have no problem restoring the web files but the sql automatically change the name to xx_databasename. And when I tried to see the website live, it says there is a problem to establish a database connection.

Does anyone know how to solve this issue?