Start using MySQL
Navigate databases and tables
Create the notes database with deliberate Unicode defaults, select it for the session, and inspect its tables and schema.
MySQL calls a named collection of tables a database. One server hosts many of them, so the first navigation skill is knowing which databases exist and which one your session is pointed at.
See what the server already has:
SHOW DATABASES;
A fresh installation lists system databases such as mysql, information_schema, and performance_schema. Leave those alone — the server uses them for accounts, metadata, and diagnostics.
Create this course’s database with an explicit character set and collation:
CREATE DATABASE notes_app
CHARACTER SET utf8mb4
COLLATE utf8mb4_0900_ai_ci;
USE notes_app;
SHOW TABLES;
USE selects the database for the rest of the session, so table names in your statements resolve inside it. SHOW TABLES returns an empty set right now, which is correct — the database exists and has no tables yet.
If you skip USE and run a table statement anyway, MySQL refuses:
ERROR 1046 (3D000): No database selected
That error is harmless and instantly fixable, but it teaches the session model: the server does not guess which database you meant.
Once tables exist, inspect one with DESCRIBE:
DESCRIBE notes;
The output lists each column with its type, whether it accepts NULL, key information, and defaults. It is the quickest answer to “what does this table actually look like?” without reading application code. For the full definition, including indexes and the character set, use SHOW CREATE TABLE notes; instead.
Two commands keep you oriented before anything destructive:
SELECT DATABASE(), CURRENT_USER();
DATABASE() returns the currently selected database, or NULL when none is selected. Always confirm the active database before running destructive statements. A DROP TABLE aimed at the wrong database is exactly the kind of mistake this two-second check prevents.
Lesson completed