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.
- 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 distribution
Type '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: