Install MySQL on Solaris 11.3

Let’s see whats available
=========================

root@solaris11:/# pkg search -r mysql|grep summary|grep Database
pkg.summary set MySQL Database Management System (Base) pkg:/database/mysql-common@5.11-0.175.3.0.0.30.0
pkg.summary set MySQL 5.1 Database Management System pkg:/database/mysql-51@5.1.37-0.175.3.0.0.30.0
pkg.summary set MySQL 5.5 Database Management System pkg:/database/mysql-55@5.5.43-0.175.3.0.0.30.0
pkg.summary set MySQL 5.6 Database Management System pkg:/database/mysql-56@5.6.21-0.175.3.0.0.30.0
root@solaris11:/#

looks like there are 3 versions out there. Lets go for the latest, but first check it

Check it before installing
==================
root@solaris11:/# pkg info -r mysql-56
Name: database/mysql-56
Summary: MySQL 5.6 Database Management System
Category: Development/Databases
State: Not installed
Publisher: solaris
Version: 5.6.25
Build Release: 5.12
Branch: 5.12.0.0.0.90.0
Packaging Date: January 21, 2016 05:42:10 PM
Size: 447.83 MB
FMRI: pkg://solaris/database/mysql-56@5.6.25,5.12-5.12.0.0.0.90.0:20160121T174210Z

Install It:
===========
root@solaris11:/# pkg install mysql-56
Packages to install: 2
Services to change: 2
Create boot environment: No
Create backup boot environment: No

DOWNLOAD PKGS FILES XFER (MB) SPEED
Completed 2/2 231/231 90.0/90.0 143k/s

PHASE ITEMS
Installing new actions 269/269
Updating package state database Done
Updating package cache 0/0
Updating image state Done
Creating fast lookup database Done
Updating package cache 1/1
root@solaris11:/#

Is it there?
============
root@solaris11:/# svcs -a | grep mysql
disabled 12:38:21 svc:/application/database/mysql:version_56
root@solaris11:/#

Enable the MySQL Service
=====================
root@solaris11:/# svcadm enable mysql
root@solaris11:/# svcs -a |grep mysql
online 13:11:28 svc:/application/database/mysql:version_56
root@solaris11:/#

Install the client  (optional)
==================
root@solaris11:/usr/mysql/5.6# pkg install mysql-56/client
Packages to install: 1
Mediators to change: 1
Create boot environment: No
Create backup boot environment: No

DOWNLOAD PKGS FILES XFER (MB) SPEED
Completed 1/1 36/36 25.3/25.3 255k/s

PHASE ITEMS
Installing new actions 60/60
Updating package state database Done
Updating package cache 0/0
Updating image state Done
Creating fast lookup database Done
Updating package cache 1/1
root@solaris11:/usr/mysql/5.6#

Let’s connect to it
===================
root@solaris11:~# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.21 MySQL Community Server (GPL)

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql> Ctrl-C — exit!
Aborted
root@solaris11:~#

Leave a Reply

Your email address will not be published. Required fields are marked *