I don't see any code, but guessing from that stack trace, your
JDBC URL
string said you wanted to connect to a database named "database". The MySQL server responds that there isn't any such database. Given that response, you might want to change your URL string to reference a database which does exist.