Database completely gone

The original error message seemed to indicate that the database was corrupted. Because of this, just because Phpstorm can connect to the database doesn’t mean that the data within the database is correct.

The reason you received a timeout error within PHPstorm, is likely due to not having a port number within the configuration settings. Can you take a look at this FAQ and ensure that you are using localhost as well as the port number for the site configuration?