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:

  1. Open a Command Prompt and use the cd command to change directories to the location that contains the books.sql script.

  2. Start the MySQL monitor by typing

    
         mysql -h localhost -u deitel -p
    
    

    The -p option prompts you for the password for the deitel user account. When prompted, enter the password deitel.

  3. Execute the script ...

Get Java How to Program (early objects), 9/e now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.