Archive for January 2008

Installing MySQL on SXDE (build 70)

There are a few different ways you could get mysql on your solaris machine:

  • blastwave.org where you can get mysql and many other packages using an apt style package installation mechanism
  • sunsource.net where the packages have been optimised for solaris (and now that Sun are in the process of aquiring mysql we can hope that multitheaded developement will increase in line with Suns processor designs)

For this installation we’ll be using the packages from sunsource.net

So heres what you need to do:

Download the CSKruntime, CSKmysql and the CoolStack Documentation packages from sunsource.net and extract the archives using bzip2.

You should have something like:

# ls
CSKmysql_1.2_x86.pkg        CSKruntime_1.2_x86.pkg

Mysql depends on CSKruntime so install the runtime first:

# pkgadd -d /directory_where_your_file_is/CSKruntime_1.2_sparc.pkg

Once its installed make sure you install mysql having used pkgtrans – otherwise the install won’t work 100% (this has been the case for me, your millage may vary)

# pkgtrans CSKamp_1.2_x86.pkg /var/tmp
# pkgadd -d /var/tmp

Now initialise the database tables:

# /opt/coolstack/mysql/bin/mysql_install_db --datadir=/tank/mysql_data

Note that this is not the usual mysql data directory. In my case, this directory happens to be on a ZFS filesystem in a RAID 1 configuration.

To quote the README that comes with the install in /opt/coolstack/mysql/README

” mysql_install_db creates two directories “mysql” and “test” in data directory.
mysql directory has the MySQL privilege tables. test has the “test” database
These two directories are needed for mysql to start. If you are using a
different data directory later, you need to copy these two directories over. ”

Next create the mysql user and mysql group for the mysql service to use:

# groupadd mysql
# useradd -g mysql mysql
# chown -R mysql:mysql /tank/mysql_data

If you didn’t use the standard mysql data dir you will need to edit the SVC manifest file so that it knows where your data dir is:

/opt/coolstack/lib/svc/method/svc-cskmysql
<snip>
MYSQL_DIR=/opt/coolstack/mysql
DB_DIR=/tank/mysql_data/data/
PIDFILE=${DB_DIR}/`/usr/bin/uname -n`.pid
<snip>

Once this is done you should be able to start the mysql service with a simple:

svcadm enable  csk-mysql

After this you’ll need to log in as root and change the root password to something suitable

#/opt/coolstack/mysql/bin/mysql –user=root mysql

You will also want to add regular users to mysql also

Striking with a shot in the dark

In my previous post I suggested that President Bush could be in the Middle East to further national interest.

At this opening of an Economic crisis, it appears that sighing off a deal or two wouldn’t go a miss… Accordingly, whilst on tour, an offer was made to the gulf governments for $20 Billion US dollars for arms to defend/prepare/waste against the Iranians.

Given that it seems the US economy is not likely to restore order to the world economics, the next year will tell whether or not it is the increase in Chinese domestic spending which pulls the US out of a spiraling recession.

What nation wouldn’t resort to reconciling with a people who it couldn’t agree with on social, economic, political and human rights levels to stem an economic hemorrhage.

It really begs the question: What would Saudi Arabia do with precision guided bombs and patriot missiles? Maybe they could collect some dust, like the majority of other weapons they like to buy from the US. “mmmmm, lost of surfass areeeaaa, like our oder weaponz in storage. Misterrrrr Bushhh, vee haff a deeel! Do you take cash, cheque or camel?”

The middle east visit for peace (and maybe national interest)

Recently President Bush has made in a visit to the middle east, principally to call for peace between the Israelis and the Palestinians. This is a worthy effort, and all calls for peace should be listened to. However, the question to ask is, why. Not why should we call for peace, but rather, why would a man who has led two major invasions and occupations of foreign lands want to work for peace? Maybe he has decided that killing is not the way forward. Or maybe, just maybe, there is something about the securing the interests of the American people that requires him to be there. Perhaps to make Tel Aviv nicer for holidays.

Calls to establish peace should and will be applauded and supported. Hypocrisy should not.

Its interesting to see how the President was greeted by Officials of the Arab nations. In Islam, it is recommended to give pleasant greetings and gifts. Offering of food and water is a stapple when you enter any muslim home. :) The prophet Mohamed PBUH would look after his neighbours and extend hospitality to his guests. I wonder if he would invite a man to his house, who led an administration responsible for the deaths of thousands of Muslims, or whether he would even have one of his officers goose step for him. Mind you, given that leaders of Arab states struggle to represent the interests of the Muslim people they rule, its not very surprising.

Once the placebo of a peace agreement begins to anaesthetise parts of the middle east, maybe we will see the levels of violence to non-combatants fall. The incredible thing about Bethlehem, seems to be the lack of effort on the part of the catholic church to defend the land and people in which Jesus was supposed to have been born. Now that Tony Blair is a Catholic and has showed signs of interest for peace in the middle east, he can go over there and work some secular magic on behalf of the Church to rescue his people from persecution.

Whilst the peace process is underway, we are likely to see continued efforts to arm the Palestinians with weapons and not intellect. The question I would want to ask would be whether or not they fight for their people in the way of God, understanding the non-secular nature of Islam, or whether they are simply furthering a Patriotic/Nationalistic doctrine.