Perl-MySQL Programming ====================== File Description/Notes --------------------- ------------------------------------------------- DBI.txt Documentation for the Perl DBI module, which provides generic database access. DBD_mysql.txt Documentation for the Perl DBD::mysql module, which is the driver used by DBI to connect to a MySQL server. README_Perl.txt This file. my Shell script to set up your UNIX environment for MySQL and ActivePerl: . ./my Verify your PATH with: echo $PATH NOTE #1: In L-5, you must use ActivePerl, because the DBI and DBD::mysql modules have already been installed. The first line of your Perl programs must read: #! /usr/local/activeperl/bin/perl OR #! /usr/local/activeperl/bin/perl -w NOTE #2: If you are developing on your own computer, you can use the following commands to install the DBI and DBD::mysql modules on your own ActivePerl installation: ppm search DBI ppm install DBI ppm search DBD ppm install DBD-mysql createdb.sql Create the database first: mysql -U root -P < createdb.sql createusers.sql Create the users next: mysql -U root -P < createusers.sql createtables.sql Create the tables next: mysql -U musicdba -P < createtables.sql (Password is "anda1234") Do the inserts next: mysql -U musicuser -P < _______.sql (Password is "1234") insert_genres.sql insert_media_types.sql insert_tracks.sql testmysql.pl Do a dump of the track table (artists and song titles only). selectpretty.pl Do a "pretty print" of the artists and song titles only. mysqlins.pl Insert a new media type into the media_type_list table. Uses a (safe) "parameterized query" to do the insert. ===End of README_Perl.txt=== Last modified: Fri Oct 31 10:58:26 EDT 2008