25.7. Creating Database books in MySQL
For each MySQL database we discuss in this book, we provide a SQL script in a file with the .sql extension that sets up the database and its tables. You can execute these scripts in the MySQL monitor. In the examples directory for this chapter, you’ll find the SQL script books.sql to create the books database. For the following steps, we assume that the MySQL server (mysqld-nt.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 the books.sql script.
Start the MySQL monitor by typing
The -p option prompts you for the password for the jhtp7 user account. When prompted, ...
mysql -h localhost -u jhtp7 -p