Beruflich Dokumente
Kultur Dokumente
11 MySQL Clustering
Objective
Pre-requisites
Assumptions
Procedure
Preparation
1. OpenSolaris is mainly based on Solaris. Therefore the package available for Solaris 10 at the
above URL should work well in OpenSolaris 2008.11.
2. Extract the downloaded file to obtain a file with a .pkg extension.
3. Before proceeding to installation, check for previous versions of MySQL present on the system
using the following command –
4. If there are any installations of MySQL on the system, it is preferable to remove them with the
following command –
pkgrm <pkg_name>
Installing MySQL Community Server 5.1 – OpenSolaris 2008.11 MySQL Clustering
5. It is recommended to create a group named mysql and a user in that group with the name
mysql. Generally both the group and the user exist by default, so explicitly creating them isn’t
required. If they are already present, the commands will give an error. Ignore them and move
ahead.
groupadd mysql
useradd –g mysql mysql
Installing MySQL Community Server 5.1 – OpenSolaris 2008.11 MySQL Clustering
Installing MySQL Community Server 5.1 – OpenSolaris 2008.11 MySQL Clustering
Installation
pkgadd –d solaris.pkg
3. If the directory /opt/mysql isn’t present, the setup will ask for permission to create it.
Installing MySQL Community Server 5.1 – OpenSolaris 2008.11 MySQL Clustering
4. The package contains scripts which use super-user privileges. Allow the package to use them.
Configuration
1. Navigate to /etc/init.d and open the file mysql using a text editor.
Installing MySQL Community Server 5.1 – OpenSolaris 2008.11 MySQL Clustering
3. Navigate to /opt and change the ownership of the mysql directory to the mysql user.
4. Change the user to mysql and navigate to the scripts directory - /opt/mysql/mysql/scripts.
Installing MySQL Community Server 5.1 – OpenSolaris 2008.11 MySQL Clustering
7. Navigate to the bin directory and start mysqld_safe with the following command –
8. This starts the MySQL server. If the above command gives any errors and terminates
unsuccessfully, delete the data directory and run step 5. Try the above command again and if
errors still persist, check opensolaris.err present in the data directory with a text editor and
proceed accordingly.
9. Finally start the MySQL client using the following command in the bin directory –
./mysql
Installing MySQL Community Server 5.1 – OpenSolaris 2008.11 MySQL Clustering
NOTE – The above screen shots use the name “solaris.pkg” for the downloaded
package. However the name may differ and the appropriate name should be used.