IT 202 - Web and Multimedia Technology

Lab 11 - Fall 2007

Due: Thursday 11/15/2007 by 11:59 pm.

For lab this week, we want to get MySQL installed on your linux machine.

To make php support mysql, we need to install a module, you can use the following command:

     sudo apt-get install php5-mysql
To install mysql server on local computer, you can use the following command:
     sudo apt-get install mysql-server-5.0
To change the password of root, you can log onto mysql server first by the following steps.
  1. mysql -u root
  2. use mysql
  3. update user set Password=PASSWORD('newpassword') where user='root';
  4. FLUSH PRIVILEGES;
After that, you need to use following command to log onto the mysql server.
     mysql -u root -p
You can download a web based mysql administrate tool: php myadmin in the lab at: http://192.168.1.1/download

Unzip the file and put these pages under the web directory, then you can administrate that by web pages. After that, if you want manage mysql with php myadmin, you need config that by following steps.

  1. copy config.sample.inc. php to config.inc.php
  2. change $cfg['blowfish_secret'] = ''; to $cfg['blowfish_secret'] = 'ssss';i
    /*"sss" can be replaced by anyother string*/

A simple page to test if PHP can access your MySQL server is at testmysql.php. You may need to edit the file to reflect the user and password set up on your server.

This lab assignment is to done in the lab in SEL 2264.