Installing MySQL Cluster 7.0 – OpenSolaris 2008.11
MySQL Clustering
Installing MySQL Cluster 7.0 – OpenSolaris 2008.11 Objective To install MySQL Cluster 7.0 in OpenSolaris 2008.11.
Pre-requisites 1. Download MySQL Cluster 7.0 from http://dev.mysql.com/downloads/cluster/7.0.html
Assumptions 1. There isn’t any version of MySQL installed on the system.
Procedure Installing MySQL Cluster 7.0 in OpenSolaris has a few common steps to installing MySQL Community Server 5.1. Please refer the Preparation phase and the first four steps of the Installation phase of “Installing MySQL Community Server 5.1 – OpenSolaris 2008.11” Guide. The following procedure continues from there –
1. The package copies all the files successfully to the /opt/mysql/mysql-cluster directory but the port-install script fails. This is because the script refers to the /opt/mysql/mysql but the installed directory is /opt/mysql/mysql-cluster. Ignore this error and run the script manually (shown in the configuration phase).
Installing MySQL Cluster 7.0 – OpenSolaris 2008.11
MySQL Clustering
Configuration 1. Navigate to the /opt/mysql directory and move the contents of the mysql-cluster directory to mysql directory using the following command – mv mysql-cluster mysql
Installing MySQL Cluster 7.0 – OpenSolaris 2008.11
MySQL Clustering
2. Navigate to /opt and change the ownership of the mysql directory to the mysql user. There may be error here, ignore them too.
Installing MySQL Cluster 7.0 – OpenSolaris 2008.11
MySQL Clustering
3. Change the user to mysql and navigate to the scripts directory - /opt/mysql/mysql/scripts. Run the mysql_install_db script using the following command – ./mysql_install_db --user=mysql --ldata=/opt/mysql/mysql/data --basedir=/opt/mysql/mysql
Installing MySQL Cluster 7.0 – OpenSolaris 2008.11
4. The script completes its execution after a short while.
MySQL Clustering
Installing MySQL Cluster 7.0 – OpenSolaris 2008.11
MySQL Clustering
5. Navigate to the bin directory and start mysqld_safe with the following command – ./mysqld_safe --datadir=../data --user=mysql
6. 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. 7. Finally start the MySQL client as the root using the following command in the bin directory – ./mysql –user=root
Installing MySQL Cluster 7.0 – OpenSolaris 2008.11
MySQL Clustering