Every SQL query runs in the context of a specific database. Before you can execute any query on the Nobregas MySQL Panel, you need to select which database to target. This is equivalent to the MySQL USE database_name; command.
Why You Must Select a Database First
Without selecting a database:
- The panel does not know which database to execute your query against.
- You will see an error or be prompted to choose one.
- Table names in your query will not resolve.
Selecting a database tells MySQL where to look for tables, views, and stored procedures referenced in your query.
Step-by-Step: Selecting a Database
- Log in at mysql.nobregas.org.
- Click SQL Query in the top navigation bar.
- At the top of the query page, find the database dropdown.
- Click the dropdown and select the database you want to query.
- The selection is confirmed and your queries will now run against that database.
Switching Databases
You can change the active database at any time:
- Click the database dropdown.
- Select a different database.
- Any subsequent queries run against the newly selected database.
Your query text stays in the editor when switching databases — you can run the same query on a different database by simply changing the selection.
Which Databases Appear?
The dropdown lists all databases associated with your account. Each database appears with its full name including your account prefix (e.g., u24a5d4_wordpress).
If the dropdown is empty, you have not created any databases yet. Go to the Databases page to create one first.
Common Mistakes
Querying the wrong database
Always double-check the selected database before running destructive queries like DELETE, DROP TABLE, or TRUNCATE. Running these on the wrong database can cause data loss.
Forgetting to switch
If you manage multiple databases (e.g., staging and production), verify the selection before each query session. The panel remembers your last selection, which may not always be the database you intend to work on.
Referencing Tables Across Databases
If you need to query a table in a different database without switching, you can use the fully qualified name:
SELECT * FROM other_database.table_name;
This only works if your user has access to both databases.