MySQL with Solaris 10
preinstalled MySQL
MySQL is installed as sfw-package.
You can find some infos under
/etc/sfw/mysql/README.solaris.mysql
groupadd -g 600 mysql
useradd -g mysql -u 600 mysql
/usr/sfw/bin/mysql_install_db
output
chgrp -R mysql /var/mysql
chmod -R 770 /var/mysql
installf SUNWmysqlr /var/mysql d 770 root mysql
cp /usr/sfw/share/mysql/my-small.cnf /etc/my.cnf
/usr/sfw/sbin/mysqld_safe --user=mysql &
Install a newer MySQL with pkgsrc
-
cd /usr/pkgsrc/databases/mysql51-server
-
echo "PKG_OPTIONS.mysql5=embedded-server -ssl" >> /usr/pkg/etc/mk.conf
-
groupadd -g 600 mysql
-
useradd -g mysql -u 600 mysql
-
bmake install
- create a MySQLManifest in
/var/svc/manifest/application/database
with the name mysql.xml
- and a MySQLStartupscript in
/lib/svc/method
with the name mysql
- Import manifest with
/usr/sbin/svccfg import /var/svc/manifest/application/database/mysql.xml
- check the import with
svcs mysql
- enable MySQL with
/usr/sbin/svcadm enable mysql
- check again
svcs mysql
or svcs -xv mysql