Linux Lab #8 (25pts)

Due Monday June 13

Use the script command to make a log of your activities. The log should be named Lab8.HOSTNAME.DATE where HOSTNAME is your hostname (fetched from an environment variable or inline execution) and DATE is the current date and time in the format MMDDYY (fetched with inline execution). (E.g. "Lab8.LINFORD3040.052305")

In answering direct questions below (as marked by the question-mark '?'), use a shell comment to give your answer. For example, if I say: "What is the command to give you the system time?" You should type, at the command prompt, "# date is the command" or something to that effect. The important part is the hash-mark '#' which causes the shell to ignore everything behind it.

I strongly recommend that you use two terminals: one to run the script command and one to test your commands before executing them under script. It's also a good idea to use shell comments to say which part of the assignment the following commands are for.

Do not run any program which generates lots of escape- and meta-characters inside a terminal running the 'script' command. This includes man, vi, and pico.

Configure MySQL 4

  1. Become root
  2. Make sure the mysql service is running
  3. Show the username under which the mysqld process is running
  4. Use mysqladmin to set the mysql root user's password
  5. Show the new root password with a shell comment
  6. Make a backup copy of the MySQL configuration file with filename /etc/my.cnf.DATE.bak where DATE is the current date with the format string "+%m%d%y-%H:%M.%S"
  7. Edit the MySQL configuration file to...
    1. Force all interaction with the MySQL server to be through UNIX sockets and named pipes
    2. Use the mysql user for all server processes
  8. Use diff to show the changes you made to the MySQL configuration file

When finished, type exit or press ^D until you get a message like "Script done, file is Lab8.HOSTNAME.DATE". To turn in the assignment, scp the logfile to as user "cs3040"