CECS 5450

Internet Services

Summer II


Assignment #4

Due Date: August 4, 2003

Value: 20 points total


  1. Send the instructor an e-mail telling when you have completed the first part. Send along the URL of UBB with the password to gain access to the secure section of the board. greg@tapr.org. Be sure to include group information.
  2. Post an e-mail to the class list containing the written part of the assignment (part 2). Use the following subject line: Your Name - Assignment 4

Part 1 (15 pts)

      1. Install and Configure MySQL (Stage 1)
      2. Create the web-based database-driven system outlined in the RedHat Book (p 161)

Part 2 (5 pts)

  • Locate and read, from any professional journal, two articles relevant to the area of Database driven web approach and/or systems. Write a two paragraph review for each article. The 1st paragraph should describe the contents of the article. The 2nd paragraph should be your reaction to the article. Do not forget to include the reference cite. Use APA format.

  • Reply to at least two postings in a meaningful manner. Be sure to include your name in the subject line like: Re: There Name - Assignment #4 - Your Name

Stage 1 - MySQL Install

I will be reviewing the following two sections at the first of the course to make sure nothing has changed from the Spring Semester. Be warned, these section might change by the time we get to them. - Dr. Jones.

Read pages 161-162

Refer to this section instead of page 163, Steps 1, 2, and 3.

Installing and getting MySQL Operational without RPM
Steps for MySql 4.0.12

Visit http://www.mysql.com/downloads/download.php?file=Downloads%2FMySQL-4.0%2Fmysql-standard-4.0.12-pc-linux-i686.tar.gz&pick=mirror

Place in /usr/local/src

gunzip mysql-standard-4.0.12-pc-linux-i686.tar.gz

tar -xvf mysql-standard-4.0.12-pc-linux-i686.tar

create a directory link between /usr/local/mysql and the new mysql directory
shell> ln -s /usr/local/src/mysql-standard-4.0.12-pc-linux-i686 /usr/local/mysql

NOTE: The mysql-standard-4.0.12-pc-linux-i686 will change depending on the version of mysql you downloaded and the entire path will depend on where you downloaded the mysql source to. In this case, I downloaded it into /usr/local/src

Add a user and group for mysql. These commands add the mysql group and the mysql user.
shell> groupadd mysql
shell> useradd -g mysql mysql

Change into the intended installation directory:
shell> cd /usr/local

Continue with the install
shell> cd /usr/local/mysql

shell> scripts/mysql_install_db
shell> chown -R root .
shell> chown -R mysql data
shell> chgrp -R mysql .

Begin the mysql deamon
shell> bin/mysqld_safe --user=mysql &

When you are ready to automate the start of the process:
Later on add this command to the rc.local
/usr/local/mysql/support-files/mysql.server start

Note: Any new data goes into /usr/local/mysql/data

Ways to test
shell> cd /usr/local/mysql/bin
shell> ./mysqladmin version
This should return the version

continue with Step 4 on page 163

RedHat 165 - 168
Error on Page 168
be sure to add a value for the Owner field. That field is missing from the example and you will get the following error if you leave it out.

ERROR 1136: Column count doesn't match value count at row 1

Stage 2 - Interacting with the SQL Server using Scripts

Note This stage requires that we compile some code on the system. Since we did not install the development tools at the first of the course, we need to add those. This is normally done by simply inserting RedHat Disk 2 into the CD drive and selecting the new package to install. For some reason, it is not allowing us to install it. Karl has found a thread that indicates that when RedHat 8 has a power failure (which we have had this semester on the systems) that a problem can be introduced into the RPM database. We are looking into this and I'll let you know about Stage 2 as soon as possible. I am making the notes here for the process, in case some of you want to work on this problem as well. Could be you find someone before I do. If you do, please post to the class list.

The purpose of this section is to get the interface between the PERL scripts and MySQL in palce.

RedHat pages 169-186

Installing Perl DBD and DBI Use the following steps to download and install DBD and DBI on page 170

Visit: http://www.cpan.org/modules/by-category/07_Database_Interfaces/DBD/

Scroll down to the latest MySQL DBD driver file (currently DBD-mysql-2.1026.tar.gz 03-Mar-2003 12:46 96K) and click to download it to /usr/local/src

After this is complete, scroll down to download the latest Database Interface driver file (currently DBI-1.35.tar.gz 07-Mar-2003 14:02 281K) to /usr/local/src

gunzip and tar extract both files after downloading.

Move or Copy both folders into the Perl Library directory: /usr/lib/perl5/5.8.0

NOTE: The 5.8.0 directory name will depend on which version of PERL you are running. It was 5.0.8 on my RedHat 8 box, but always check on your system.

Now you need to complie the modules.

Install the Perl MySQL DBI module

    cd DBI-1.35
    perl Makefile.PL
    make install
You have now installed the Perl DBI module.

Install the Perl MySQL DBD module:

    cd ../DBD-mysql-2.1026
    perl Makefile.PL
    make install
You have now installed the Perl MySQL DBD module.

Continue with the RedHat book Step 3, page 170

You should now be able to have web pages that access the mysql database.