ติดตั้ง MySQL บน Solaris ด้วย binary package (native Solaris PKG format) แทน binary tarball ต้องมี Oracle Developer Studio 12.6 Runtime Libraries ติดตั้งก่อน
Uncompress Solaris Package
shell> gunzip mysql-8.0.25-solaris11-x86_64.pkg.gz
Install New Package
ใช้ 'pkgadd' ตาม onscreen prompts ต้องมี root privileges
shell> pkgadd -d mysql-8.0.25-solaris11-x86_64.pkg The following packages are available: 1 mysql MySQL Community Server (GPL) (i86pc) 8.0.25 Select package(s) you wish to process (or 'all' to process all packages). (default: all) [?,??,q]:
PKG installer ติดตั้ง files, tools, และ initialize database (ถ้ายังไม่มี)
ตั้ง root password ตาม instructions ท้ายการติดตั้ง หรือรัน script 'mysql_secure_installation'
Default install path: /opt/mysql เปลี่ยนได้เฉพาะ用 'pkgadd' (ติดตั้งใน zone อื่นได้)
Safe Startup และ Shutdown
สร้าง link ระหว่าง file และ 'init' script directories:
shell> ln /etc/init.d/mysql /etc/rc3.d/S91mysql shell> ln /etc/init.d/mysql /etc/rc0.d/K02mysql
Upgrade Solaris package: remove existing package ก่อน install updated package (ไม่ลบ database data แค่ server, binaries, support files)