Sysadmin > SolarIs > SolarisMySQL

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

  1. cd /usr/pkgsrc/databases/mysql51-server
  2. echo "PKG_OPTIONS.mysql5=embedded-server -ssl" >> /usr/pkg/etc/mk.conf
  3. groupadd -g 600 mysql
  4. useradd -g mysql -u 600 mysql
  5. bmake install
  6. create a MySQLManifest in /var/svc/manifest/application/database with the name mysql.xml
  7. and a MySQLStartupscript in /lib/svc/method with the name mysql
  8. Import manifest with /usr/sbin/svccfg import /var/svc/manifest/application/database/mysql.xml
  9. check the import with svcs mysql
  10. enable MySQL with /usr/sbin/svcadm enable mysql
  11. check again svcs mysql or svcs -xv mysql