Sun GlassFish Web Space Server 10.0 Administration Guide

ProcedureTo Install and Configure MySQL

  1. Install MySQL by typing the following commands as superuser.

    # 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 the MySQL installation by going to the MySQL installation directory and typing the following command:

    mysql -u root

  3. Create the UTF-8 database by typing the following commands:

    mysql> create database lportal default character set utf8
    mysql> use lportal;
    mysql> create user lportal;
    mysql> grant all privileges on *.* to 'lportal'@'localhost' identified by 'lportal';
    mysql> set password for 'lportal'@'localhost' = password('lportal');
  4. Enable UTF-8 support for MySQL.

    See, To Connect to a Database Other Than HSQL