To use mysql a number of post-install procedures need to be made by root.

The following steps are derived from the mysql manual (manual.ps, manual.txt or
manual_toc.html) found in the /usr/sfw/src/mysql/Docs directory.

Initialise the database tables.

# /usr/sfw/bin/mysql_install_db

Create mysql user and group and change data directory group.

# groupadd mysql
# useradd -g mysql mysql
# chgrp -R mysql /var/mysql
# chmod -R 770
# installf SUNWmysqlr /var/mysql d 770 root mysql

MySQL reads configuration files from different places in the following order.

Filename                Purpose
---------		---------
/etc/my.cnf             Global options

DATADIR/my.cnf		Server-specific options

defaults-extra-file	The file specified with
			--defaults-extra-file=path

~/.my.cnf		User-specific options

Optionally copy a mysql daemon configuration file to configuration directory.
Note there are other configuration profiles available.
For default solaris installation DATADIR is /var/mysql.

# cp /usr/sfw/share/mysql/my-medium.cnf /var/mysql/my.cnf

Start mysql daemon by hand
# /usr/sfw/sbin/mysqld_safe --user=mysql &

Optionally perform the following steps for automatic start and stop of
mysql daemon at boot and shutdown.

Link boot time start up script from rc3.d and rc[012S].d
# ln /etc/sfw/mysql/mysql.server /etc/rc3.d/S99mysql
# ln /etc/sfw/mysql/mysql.server /etc/rc0.d/K00mysql
# ln /etc/sfw/mysql/mysql.server /etc/rc1.d/K00mysql
# ln /etc/sfw/mysql/mysql.server /etc/rc2.d/K00mysql
# ln /etc/sfw/mysql/mysql.server /etc/rcS.d/K00mysql
