Sun GlassFish Web Space Server 10.0 Installation Guide

ProcedureTo Install and Configure MySQL

This procedure describes only the most basic MySQL installation on Solaris with UTF-8 support. The Web Space Server configuration portion of this procedure applies to all platforms. For more detailed MySQL installation instructions, refer to the MySQL installation documentation.

  1. Install MySQL.

    Enter the following commands in a command shell as the root user.


    # groupadd mysql
    # useradd -g mysql mysql
    # cd /usr/local
    # gunzip install-dir/mysql-VERSION-OS.tar.gz | tar xvf -
    # ln -s install-dir/mysql-VERSION-OS mysql
    # cd mysql
    # chown -R mysql .
    # chgrp -R mysql .
    # scripts/mysql_install_db --user=mysql
    # chown -R root .
    # chown -R mysql data
    # bin/mysqld_safe --user=mysql & *
    
  2. Log in to MySQL as the root user.


    bin/mysql -u root
    
  3. Create the Web Space Server database with UTF-8 support.


    create database lportal default character set utf8;
    use lportal;
    grant all privileges on lportal.* to 'lportal'@'localhost' identified by 'lportal';
    

    This example creates a database and a user, both named lportal, but you can use different database and user names, and these names can be whatever you want.

  4. Proceed to To Connect to a Database Other Than HSQL for additional configuration instructions.