Database Reference
In-Depth Information
ries other than the one that MySQL us running from. Start up a command prompt, by
selecting Start/Run and typing command. Then type:
cd \mysql\bin
to get to the binary directory and then type:
mysql
to run the client. Once the client is running you can then run the script. You do this by
using the command source and giving the command a filename as follows:
source scriptimport.sql
This will run the script and the output can be seen in Figure 5.5.
You will notice from the last line of our script that we added:
SELECT * FROM Cookies
at the end of the script. Because of this we have a sample output at the end of the query.
You can clearly see that 6 rows have been created, the dates have been inserted and the auto-
generated cookieIDs have been created. To prove that MySQL is a multi-user system, load
Figure 5.5
Running a script from the command line.
Search WWH ::




Custom Search