OpenSolaris 2008.05: Installing MySQL 5
Looking at the MySQL web site, the instructions for Installing MySQL Community Server seem more complicated then they need to be. Maybe that's because there are no instructions for OpenSolaris (yet - I hope). Here are the easy steps that got me up and running.
Install MySQL
- Open the Package Manager: System > Administration > Package Manager (give it a couple of seconds to load the package information):

- Enter mysql5 in the Search text box .The list will filter as you type.

- Select the check box for SUNWmysql5 and click the Install/Update button in the toolbar;

- Wait while package dependencies are checked and then click Next on the Install / Update Confirmation dialog:

- Wait while the packages are downloaded and installed:

- After which, the Package Manager will show MySQL as installed:

Start the MySQL Service
- Open System > Administration > Services and scroll down to MySQL RDBMS in the list:

- Click the check box to enable the MySQL RDBMS:

Verify the Installation
Note, the MySQL documentation's Installation Layouts page does not cover OpenSolaris, but you'll find the binaries in /usr/mysql/bin and the databases in /var/mysql/data.
-
Open a terminal and start the MySQL client:
bleonard@opensolaris:~$ /usr/mysql/bin/mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.0.45 Source distributionType 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
+--------------------+
3 rows in set (0.00 sec)
-
If you have NetBeans 6.1 installed it will also show you your MySQL databases in the services tab:

- Login or register to post comments
- Printer-friendly version
- bleonard's blog
- 4151 reads






Comments
by spl - 2009-01-22 13:56
Hi Brian, It looks like it is working now. However, I don't quite understand how to add table to one of the databases; for example, on test. I have to create some kind of jdbc connection to mysql with root as user, then I could add a table here. Where does the table go after I create them? Please advice. Regards, Samby bleonard - 2009-01-21 19:07
Hi Sam, NetBeans 6.5 should automatically detect MySQL once it's installed and running? Is this not working for you? /Brianby spl - 2009-01-21 12:51
Hi Brian, Could you please advice on how to setup MySQL using NetBeans 6.5? Or could you please direct me to a link? Regards, Samby hemant_bedekar - 2008-08-29 16:58
Brian, With OpenSolaris 2008.05 you gotta restart the Virtual Image after installing MySQL - only then does it show up in the list of Services. Maybe you should add this step to your instructions. Hemant hemant at sun dot comby khawjg - 2008-06-25 21:50
I did a restart of the workstation this morning and the service settings did list the MySQL RDBMS... Thanks Brian!by bleonard - 2008-09-22 08:43
Yup, I blogged about the Sun Web Stack here: http://blogs.sun.com/observatory/entry/sun_web_stack And thanks for the tip on importing the SMF manifest. /Brianby peterkarlsson - 2008-09-21 22:40
A slightly different way to install MySQL, would be to install the webstack and the webstack gui $ pfexec pkg install amp westackui or if you are a developer and want developer tools with your amp stack pfexec pkg install amp-dev webstackui The cool thing with this is the nice GUI that you get in the "Application" -> Developer Tools" Fisrt you get a nice tool initialize the stack, and wen that is do there is set of admin tools for the Webstack, nice :) And to Hermant's comment on the restart, the issue is that the SMF manifest hasn't been imported to SMF, yiou can do as follows: $ pfexec svccfg import /var/svc/manifest/application/database/mysql.xml to verify it's OK $ svcs -xv mysql Cheers, Peterby bleonard - 2008-06-25 06:39
Interesting. I should have mentioned this in the entry, but you can also start the service from the command line using the following: svcadm enable mysql Does that work for you?by khawjg - 2008-06-25 00:41
There is no mysql from the service settings list after installing mysql5 using the package manager. I followed the way how you did it.