Database Connection Issues

Pls I’m trying to connect my portal with database but if I login with right credentials the page is not redirecting help me pls

I am also trying to connect to the database. I am getting " mysqli_real_connect(): MySQL server has gone away" error.![databaseerror|546x500]"
I am unable to access my database that I created yesterday.