To begin exploring the music database, connect to the
MySQL monitor using the rootMySQL account. For Mac OS Xor Linux,
run a terminal program, and in the terminal window type
mysql --user=root --password=the_mysql_root_passwordWelcome to the MySQL monitor.
Commands end with ; or \g.
Your MySQL connection id is 3 to server version Type 'help' or 'h' for help. Type 'c' to clear the buffer.
mysql>
For Windows, click on the Start menu,
then on the Run option, and then type
cmdand press Enter.
In the DOS or command window, type:
C:\>
mysql --user=root --password=the_mysql_root_passwordWelcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3 to server version Type 'help' or 'h' for help. Type 'c' to clear the buffer.
mysql>
If you find that the monitor doesn’t start, check the
instructions in Error MessageAbout MySQL Executable Programs Not Being Found or Recognized in Chapter 2 to see how to run it.
artist_name artist_id
Artist
Compiles
Album
1
N
album_name album_id
Contains
1
Track
N
time track_name track_id
WasPlayedAt
1
Played
N
played
Figure 5-1. The ER diagram of the music database136 | Chapter 5:Share with your friends: