8.1 Setting Up the MySQL Database

8.1.1 Prerequisites

  • You have downloaded the MySQL Community Server 5.0 and client from MySQL. Select the version applicable to your platform.

    The instructions in this section are based on installing MySQL on SUSE Linux Enterprise Server 9, but most of the instructions are the same for all platforms.

  • You have installed the MySQL server and client on the same machine.

    For more information, see Installing and Upgrading MySQL in the MySQL 5.0 Reference Manual.

  • You have set up security, if desired, for the root user and the default users.

  • You know how to log in to the database. For Linux, use the following command:

    mysql -u <username> -p <password>

    If you haven’t set up security, use the following command:

    mysql -u root

    For more information, see Connecting to and Disconnecting from the Server in the MySQL 5.0 Reference Manual.

8.1.2 Preparing MySQL for Novell Audit Connectivity

  1. Log in as root to MySQL.

    The prompt changes to a mysql> prompt.

  2. Use the following commands to create a new database called naudit and to create the auditusr, who is granted all rights to the new database:

    create database naudit;
    grant all on naudit.* to auditusr@'%' identified by 'auditpwd';
    grant all on naudit.* to auditusr@localhost identified by 'auditpwd';

    The semicolons mark the end of a command and must be included as part of the command.

  3. Continue with Section 8.1.3, Installing the JDBC Driver.

8.1.3 Installing the JDBC Driver

The Auditing and Logging plug-in installed in the Administration Console requires a JDBC driver to connect to the MySQL database.

  1. Download the JDBC driver to your Administration Console from MySQL.

  2. On your Administration Console machine, log in as root.

  3. Change to the directory where you downloaded the driver and untar the file by using the following command:

    tar -xzvf mysql-connector-java-5.0.7.tar.gz
  4. Use the following command to copy the driver to its required location:

    cp mysql-connector-java-5.0.7-bin.jar /var/opt/novell/tomcat4/common/lib/
  5. Change to the /var/opt/novell/tomcat4/common/lib directory.

  6. Change the ownership of the driver by using the following commands:

    chgrp novlwww mysql-connector-java-5.0.7-bin.jar
    chown novlwww mysql-connector-java-5.0.7-bin.jar
  7. Restart Tomcat by using the following command:

    /etc/init.d/novell-tomcat4 restart