Friday Sep 07, 2012

Configuring Multiple Instances of MySQL in Solaris 11

Recently someone asked me for steps to configure multiple instances of MySQL database in an Operating Platform. Coz of my familiarity with Solaris OE, I prepared some notes on configuring multiple instances of MySQL database on Solaris 11. Maybe it's useful for some:

If you want to run Solaris Operating System (or any other OS of your choice) as a virtualized instance in desktop, consider using Virtual Box. To download Solaris Operating System, click here.

Once you have your Solaris Operating System (Version 11) up and running and have Internet connectivity to gain access to the Image Packaging System (IPS), please follow the steps as mentioned below to install MySQL and configure multiple instances:

1. Install MySQL Database in Solaris 11
$ sudo pkg install mysql-51
2. Verify if the mysql is installed:
$ svcs -a | grep mysql
Note: Service FMRI will look similar to the one here: svc:/application/database/mysql:version_51
3. Prepare data file system for MySQL Instance 1
zfs create rpool/mysql
zfs create rpool/mysql/data
zfs set mountpoint=/mysql/data rpool/mysql/data
4. Prepare data file system for MySQL Instance 2
zfs create rpool/mysql/data2
zfs set mountpoint=/mysql/data rpool/mysql/data2
5. Change the mysql/datadir of the MySQL Service (SMF) to point to /mysql/data
$ svcprop mysql:version_51 | grep mysql/data
$ svccfg -s mysql:version_51 setprop mysql/data=/mysql/data
6. Create a new instance of MySQL 5.1
(a) Copy the manifest of the default instance to temporary directory:
$ sudo cp /lib/svc/manifest/application/database/mysql_51.xml /var/tmp/mysql_51_2.xml
(b) Make appropriate modifications on the XML file
$ sudo vi /var/tmp/mysql_51_2.xml
-> Change the "instance name" section to a new value "version_51_2"
-> Change the value of property name "data" to point to the ZFS file system "/mysql/data2"
7. Import the manifest to the SMF repository:
$ sudo svccfg import /var/tmp/mysql_51_2.xml
8. Before starting the service, copy the file /etc/mysql/my.cnf to the data directories /mysql/data & /mysql/data2.
$ sudo cp /etc/mysql/my.cnf /mysql/data/
$ sudo cp /etc/mysql/my.cnf /mysql/data2/
9. Make modifications to the my.cnf in each of the data directories as required:
$ sudo vi /mysql/data/my.cnf
Under the [client] section
port=3306
socket=/tmp/mysql.sock
----
----
Under the [mysqld] section
port=3306
socket=/tmp/mysql.sock
datadir=/mysql/data
-----
-----
server-id=1
$ sudo vi /mysql/data2/my.cnf
Under the [client] section
port=3307
socket=/tmp/mysql2.sock
-----
-----
Under the [mysqld] section
port=3307
socket=/tmp/mysql2.sock
datadir=/mysql/data2
-----
-----
server-id=2
10. Make appropriate modification to the startup script of MySQL (managed by SMF) to point to the appropriate my.cnf for each instance:
$ sudo vi /lib/svc/method/mysql_51
Note: Search for all occurences of mysqld_safe command and modify it to include the --defaults-file option. An example entry would look as follows:
${MySQLBIN}/mysqld_safe --defaults-file=${MYSQLDATA}/my.cnf --user=mysql --datadir=${MYSQLDATA} --pid=file=${PIDFILE}
11. Start the service:
$ sudo svcadm enable mysql:version_51_2
$ sudo svcadm enable mysql:version_51
12. Verify that the two services are running by using:
$ svcs mysql
13. Verify the processes:
$ ps -ef | grep mysqld
14. Connect to each mysqld instance and verify:
$ mysql --defaults-file=/mysql/data/my.cnf -u root -p
$ mysql --defaults-file=/mysql/data2/my.cnf -u root -p


Some references for Solaris 11 newbies
Taking your first steps with Solaris 11
Introducing the basics of Image Packaging System
Service Management Facility How To Guide

For a detailed list of official educational modules available on Solaris 11, please visit here
For MySQL courses from Oracle University access this page.

Friday Oct 14, 2011

Transition to Solaris 11 - Batch II

The prestigious Club of Solaris 11 is growing...



Now c'mon, don't be an antediluvian, get your hands on the future by subscribing for a content rich five day program from Oracle University.

Saturday Aug 27, 2011

Directory Server 7.x Maintenance and Operations Session at Chennai

The binding factor between me and folks around me in the picture below is Directory Server (ODSEE). Thanks to 'em for showing up for a four day OU Course.

Saturday Aug 06, 2011

IDM Session in Pune

At the beautiful campus of a Client in Pune, we concluded a five day discussion on Identity Manager.



It is commendable that even after an energy sapping five day program from OU, folks still didn't turn down my request to perform teach back on the concluding day of the program. Thanks and good work.

I happened to stumble on this You Tube video on Installing Identity Manager 8.1, which I think is quite a useful one. Complete documentation on Sun Identity Manager 8.1 (n.k.a Oracle Waveset IDM) is available here.

Thanks also to all my good old friends who managed to find some time to catch up with me at Pune.

Saturday Jul 16, 2011

ODSEE Session in Bangalore

Met up with a dozen familiar faces again the bygone week for a discussion on ODSEE Maintenance and Operations. Thanks again to each of 'em for turning up for an Oracle University Course.



For those interested in knowing ways to get binaries of Directory Server Enterprise Edition, please visit this blog. Directory Server EE documentation are all available here. Click here to register for a webcast on Introduction to Unified Directory 11g on July 21 2011.

Saturday Jul 02, 2011

Identity Manager Session in Bangalore

Thanks to each one of the folks in the picture below for showing up for an OU Course on Identity Manager; more so for the free lunch on the concluding day of the session:-)



Entire set of Legacy Sun Identity Management Documentation can be found here. For information related to the Sun to Oracle Identity Management Upgrade, visit this page.

Good weekend!

Friday Jun 17, 2011

Solaris Cluster 3.2 Cluster Advanced Administration Session in Bangalore

This evening, I concluded an engaging five day session on Solaris Cluster 3.2 Advanced Administration. Thanks to each one in the photo below for showing up for an OU course on Solaris Cluster 3.2 Advanced Administration.



For complete set of documentation on Solaris Cluster 3.2, click here. Details on Solaris Cluster 3.2 certification is here. Good weekend, all. :-)

Monday Jun 13, 2011

Oracle VM for SPARC Training in Bangalore

Not long ago, Oracle announced the latest version of of Oracle VM Server for SPARC. For press release around the same, click right here. This new version now supports "live migration" details of which are neatly published on this blog.
Just around the same time, I was delivering a training program on Oracle VM for SPARC at Bangalore and in the photo below you'd see my new friends:



For complete set of documentation on Oracle VM for SPARC, go here.

Sunday Jun 12, 2011

May Engagements

This isn't exactly the way I want to be publishing my blogs, like a monthly newsletter briefing on my engagements in a month. For now though, I request my suffering readers to live by it, but I promise to be more regular than this on my blogging activities. Starting from the more recent assignment to the oldest one, please find a photo essay one below the other:


Access Manager Training at Bangalore.


Oracle Directory Server EE Training at Greater Noida.


SAM QFS Training at Hyderabad.


Finally, let me leave you with some photographs from the JavaOne conference held at Hyderabad in May this year.





Wednesday Apr 27, 2011

Catching Up...

That I've been lazy is a monumental understatement. I show up now to quickly post an update on what I've been doing over the past couple of months. Well, I have been traveling and traveling a lot. While I had an opportunity to travel across the state of Gujarat, delivering various seminars on Java/JavaFX at locations like Anand, Bhuj, Jamnagar, I, unfortunately, don't have any photographic images from the trip. What I have is, as always, batch photographs from training programs, and here it is one after the other from the most recent to the oldest:


Administering Lustre Based Cluster @ Chennai during the third week of April 2011.


Solaris Cluster 3.2 u3 Administration Session @ Delhi during the last week for March 2011.


Solaris Cluster 3.2 u3 Administration Session @ Mumbai during the mid week of March 2011.


Sun Identity Manager Deployment Fundaments II program @ Hyderabad. (Look closely and you'll see one participant attending the program using video conferencing)

I'm leaving this space, hoping to post updates more promptly and regularly.

Monday Feb 28, 2011

Changes to Java and Oracle Solaris Certifications

Click here (Select the Country, if required) and get full details on some important changes to Java and Oracle Solaris Certifications.

Tuesday Feb 01, 2011

A Month at Hyderabad

Remember writing this New Year Wishes to my friends and associates, and already one month has passed in Year 2011. Time flies! And when a month is spent in company of some good human beings, the concept of time seems so meaningless. A Shreya Ghoshal Concert and an absorbing light and sound show at Golkonda Fort was an extra topping to go with four weeks of Solaris Cluster, Sun Fire Midrange and High End Server and M-Series Server teaching sessions while at Hyderabad, the whole of January 2011. Thanks to each of the thirteen training participants for giving me a good engaging start to the Year 2011.



Thanks also to them for not turning down my request to share their 'top ten take-back' from the whole program.

Systems Training, Hyderabad 01/02/11 8:01 AM


Wednesday Dec 22, 2010

Solaris Cluster 3.2 Session in Bangalore

Guys, thank you so much for such a great time together, and for the free\* lunch.



Rest of the world, for more details on the course around Solaris Cluster, navigate to this location. And for the Certification exam on Solaris Cluster, details are here.

Sunday Dec 19, 2010

Lustre File System & N1 Grid Engine Sessions in Dubai

That the Egyptian One Pound Coin carries the figure of Pharaoh Tutankhamun is something that I learned from one of the folks in the picture below. Not just that, the story of Sphinx is quite clearer to me than ever before, thanks to these fellows from Egypt. It felt great to interact with them, learn a lot about the geography of Egypt, its culture, and was also interesting to know of the grand library that they all work for. Well, my commitment to them was to conduct a teach on Lustre and Grid Engine. In a venue at Dubai whether my discussion was useful for them is for them to comment, but I found it a good learning experience to be with them for a week and learn some interesting things. Thanks to each one of them for showing up for a course on Lustre and on N1 Grid Engine and for their wonderful company.



Tuesday Nov 16, 2010

Oracle Solaris 11 Express 2010.11

By now, I hope all of you are aware of the announcement around Oracle Solaris 11 Express 10.11. If not, read the press release here. Check out what's new in Solaris 11 Express by downloading the 'What's new' PDF file from this link. Another PDF available here talks about what's new in Oracle Solaris 11 Express for System Administrators and one another file downloadable from this location helps Applications Developers know what's new in Oracle Solaris 11 Express.

For several videos on Solaris 11 Express, check out this page.

Well, if you are one of those, who doesn't have patience to go through the resources as mentioned above, but want to get started straight away, download Oracle Solaris 11 Express from here.

And do remember to join a webcast on Dec 07 2010 around the New Oracle Solaris 11 Express. Click here to register.

Sunday Oct 24, 2010

Sun Systems Fault Analysis Workshop

A week back, I met up with the folks on the picture below for the Sun System Fault Analysis Workshop:



Sunday Oct 10, 2010

Four Engaging Days of Session On Directory Server

Feels so satisfied to have gone through an engaging four day session on Directory Server. Thanks to each of 'em in the photo below for pushing themselves to stay late on most of the evenings, including the concluding day to perform a neat 'teach back' session.



Special thanks to Ashish Adyanthaya for taking up the responsibility of capturing the 'teach back' session (most of it).


Click here for the download location of Directory Server and other related Identity Management products.

Tuesday Oct 05, 2010

Access Manager Session in Bangalore

Below is the batch photograph taken on the concluding day of a five day session on Sun Java System Access Manager at Bangalore, which began on 27 August 2010. Thanks again to David Goldsmith for the wonderful course that he developed around this product, my job was rather easy and we had good fun and great learning (I hope so).



On the last day of the program, on my request, we had a thorough revision of the whole program, in the form of a good solid 'teach back' from each of the participant. May be, that was the highlight of the whole session and I thank each of them for putting in so much of effort to help me feel satisfied and proud.

For those who are looking for details about the evolved version of the above product, I suggest going here.

Saturday Sep 04, 2010

Sun Web Server Training in Bangalore

Just yesterday, I parted a group of enthusiastic folks, after a five day session on Sun Java System Web Server. It was good fun for me and hopefully some learning for them ;)



For the entire set of documentation on Sun Web Server click right here. Also, be aware of the name change of Sun Web Server by reading this page.

Sunday Aug 29, 2010

Sun Certification to be Integrated with Oracle Certification Program

Referring to the title of this post, for more details around it, please visit Paul Sorensen's blog.

Thursday Aug 26, 2010

ZFS Session in Bangalore

It was a small team who developed the magical ZFS filesystem and it was a small team who came to learn it from me last week in Bangalore.



Thursday Aug 12, 2010

Sun SPARC MX000 Server Administration Training

Meet my new friends who came in for a MX000 Server Administration session at Bangalore.


Sunday Aug 08, 2010

Solaris Cluster 3.2 11/09 Training at Bangalore

It was quite some time since I took up a training program on HA platform for Solaris. Last week, I happened to take it up again in Bangalore. In spite of a gap, I could go through one of my favourite courses on Solaris Cluster rather easily. Thanks to all in the picture below for dropping in to our classroom session for a five day program on Solaris Cluster 3.2 11/09 release. I enjoyed every bit of it I hope they all had their share of fun and some serious learning during the program that concluded on first Saturday of August 2010. Wishing them good luck for their assignments ahead.



For a quick look at the interesting new features of Solaris Cluster 3.2, this blog is a good one. Also to remind all interested parties of a Certification Program that exists on Solaris Cluster 3.2 for which the details are right here.

Monday Aug 02, 2010

OpenSSO Deployment Essentials Session at Hyderabad

I've spoken here how engaging is to go through this program on OpenSSO. It was no different when I met up with the folks in the snap below at Hyderabad.



As usual, I didn't spare them from having to go through a teach back session on the concluding day of the program. They all did a great job in presenting the Access Management concepts in under two hours time.



Tuesday Jul 27, 2010

DSEE Training at Hyderabad

Meet the participants of last week's Directory Server EE session at Hyderabad. If interested, the course details are here.



Monday Jul 19, 2010

Java University 2010

Java University is now a part of JavaOne 2010. Subscribe for exclusive hands on training delivered by experts. Either add Java University to your JavaOne conference package by going here or register for Java University 2010 only!

Access exclusive blogs on JavaOne conference and do join the JavaOne Facebook Group clicking here.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
16
17
18
19
20
22
23
24
25
26
27
28
29
30
   
       
Today
Bookmarks