The Whirlwind Tour: Creating, Accessing, and Dropping a Database

Listing 1.1 is a very simple terminal session for creating a database and then a table, entering some rows, and then dropping the database.

Listing 1.1 also serves as an introduction to how code is presented in this book. In some of the code listings (like this one), you see the entire source code with line numbers to the left for reference. Don’t type the line numbers in your source.

Listing 1.1. Creating, Accessing, and Dropping a Database
 01 % mysql 02 mysql> show databases; 03 +----------+ 04 | Database | 05 +----------+ 06 | mysql | 07 | test | 08 +----------+ 09 2 rows in set (0.00 sec) 10 11 mysql> create database test_db; 12 Query OK, 1 row affected (0.00 sec) 13 14 mysql> ...

Get MySQL Building User Interfaces now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.