Database Reference
In-Depth Information
SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| rookery |
| mysql |
| test |
+--------------------+
The results here show the
rookery
database, and three other databases that were created
when MySQL was installed on the server. We saw the other three in
Starting to Explore
Before beginning to add tables to the
rookery
database, enter the following command
into the
mysql
client:
USE
rookery
This little command will set thenew database that was just created as the default database
for the
mysql
client. It will remain the default database until you change it to a different
one or until you exit the client. This makes it easier when entering SQL statements to cre-
ate tables or other SQL statements related to tables. Otherwise, when you enter each table-
related SQL statement, you would have to specify each time the database where the table
islocated.