28.7 Creating Database books in MySQL
For each MySQL database we discuss, we provide a SQL script in a .sql
file that sets up the database and its tables. You can execute these scripts in the MySQL monitor. In this chapter’s examples directory, you’ll find the script books.sql
to create the books
database. For the following steps, we assume that the MySQL server (mysqld.exe
) is still running. To execute the books.sql
script:
-
Open a Command Prompt and use the
cd
command to change directories to the location that contains thebooks.sql
script. -
Start the MySQL monitor by typing
mysql -h localhost -u deitel -p
The
-p
option prompts you for the password for thedeitel
user account. When prompted, enter the passworddeitel
. -
Execute the script ...
Get Java How to Program (early objects), 9/e 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.