Sun Java logo     Previous      Contents      Next     

Sun logo
Sun Java System Identity Pack 2005Q4M3 Installation  

B

Configuring MySQL

This appendix describes how to set up and configure a MySQL database for use as your default data store.

MySQL is a free database software package. You can download it from www.mysql.com. For more information about MySQL, read the MySQL manual, available online at www.mysql.com/documentation/mysql/commented/manual.php.

Sections from the manual that are particularly relevant to this discussion include:

Perform these steps on your local machine (non-shared database):

  1. Download MySQL
    Download the latest recommended version of mysql. For Windows this should be a zip file. For Solaris it is a gzip'ed tar file. For Redhat Linux, download the
    MySQL-VERSION.i386.rpm and the MySQL-client-VERSION.i386.rpm binaries. For other versions of Linux, there is a tar file.
     
  2. Install MySQL
    Unpack the MySQL image and install it as root on UNIX systems or a member of the Administrators group on Windows.
    For Windows after unzip'ing the zip file, run setup to begin the install shield extract.
    For Redhat Linux run the following command:
  3. rpm -i MySQL-VERSION.i386.rpm MySQL-client-VERSION.i386.rpm

    If you are missing the perl5 dependency (for example you have perl5.00503-12 instead), you can use the --nodeps at the end of the above command.

    Mysql is installed (untared) into /usr/bin and /var/lib/mysql on UNIX and no additions to your path need to be made. On Windows it is installed into c:\mysql and c:\mysql\bin can be added to your PATH environment to assist in running some commands.

  4. Start the mysql process
    To make sure the installation process started the mysql process, run the following command:
  5. <MySQL_Install_Dir>/bin/mysqlshow

    It should list the default databases created during the installation process.

    If this process has not been started, then use the following steps to register and start mysql.
    On Windows if you are installing in a directory other than c:\mysql then create a file called c:\my.cnf with the following content:

    [mysqld]
    basedir=d:/mysql/

    On Windows install and start the service:

    cd <MySQL_Install_Dir>/bin
    mysqld-nt --install
    net start mysql

  6. Create a MySQL database
    On Windows and Redhat Linux, the installation mechanism will create the MySQL database. On Solaris and other UNIX platforms, the following post install command must be run as root to create the database.
  7. <MySQL_Install_Dir>/bin/scripts/mysql_install_db

    The MySQL manual covers this in several places including  4.16 Post-installation Setup and Testing.

  8. Create the Identity Install Pack tables
    Modify the script create_waveset_tables.mysql, which can be found on the Identity Install Pack installation CD or in the idm/sample directory. It is recommended that you change the default password that will be used to connect to the MySQL database. Create the new tables as the MySQL "root" user using the following command.
  9. cd idm/sample
    mysql -uroot [ -ppassword ] < create_waveset_tables.mysql


    MySQL installation creates a MySQL "root" user (not to be confused with any system account "root") and prompts you to set a password.

    MySQL's interactive SQL command line tool is called mysql. MySQL utilities take option -uuser (and, optionally, -ppassword) to specify as which user to connect.


    Note  The username and password used in the command above is different than the one set in the file above. The one set in the file above should be used only by Identity Install Pack, and for security reasons should be different than the MySQL administrative account name and password.



Previous      Contents      Next     


Copyright 2006 Sun Microsystems, Inc. All rights reserved.