A troubleshooting guide explaining how to resolve MySQL connection errors when a specified database cannot be found on Vultr Managed Database clusters.
The error ERROR 1049 (42000): Unknown database 'default'
occurs when MySQL cannot locate the database specified in your connection command. This typically happens if:
To resolve the Unknown database
error:
Use the correct hostname
and port
from the Connection Details section on your database's Overview page.
Verify the database exists:
Connect to the MySQL client without specifying a database:
$ mysql --host="<hostname>" --port=<port> --user="<username>" -p
List all available databases:
mysql> SHOW DATABASES;
If your target database is missing, create it:
mysql> CREATE DATABASE <database_name>;