DotNetNuke Upgrade Error

The Assembly Version ( [ASSEMBLYVERSION] ) does not match the Database Version ( [DATABASEVERSION] )

ERROR: Could not connect to database.

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.