Wednesday, February 23, 2011

Installing MySQL

Before attempting to encode a link to MySQL, I thought I'd install MySQL on my local machine and have a bit of a play. My first port of call was the home page of the MySQL web site. I couldn't see any obvious link to installation or user instructions, so I tried the Windows page, but again it was all about selling the produce rather than using it. So I did a How to search on Google and ended up on a wikihow page which fitted the bill.

The screenshots on the installation page were from version 4.1 (I was installing 5.5), but they still pretty close to the mark. The recommendation to select "Standard Installation" from the Server Instance Configuration Wizard was a bad one because it hung. The default selection for custom installation worked better, not least because it automated the addition of the correct port to the Windows firewall.

Another reason the installation hung on my machine was AVG blocking the wizard, and it was not immediately obvious how to turn it off. After search for a forum post, it turns out I had to open Resident Shield, Advanced Settings, from the main console (see below).

From there is was pretty to uncheck "enable resident shield" (see below) to switch AVG off.

Meanwhile the wizard, having hung, needed to be closed with Task Manager, under the applications tab. Fortunately the initial installation of MySQL had placed an item in the Start menu under "Start">"All Programs">"MySQL">"MySQL Server 4.x" to restart the Server Instance Configuration Wizard, the first page of which gave the option to remove the MySQL service. I needed to do this so the wizard could then be rerun on a clean slate.

The installation page in wikihow seemed to think there would also be a menu item to Start MySQL in the command line, which there wasn't. However, the How to Send sql Queries to MySQL page had the syntax required to start mysql.exe straight from the command line.

In my case I was logging in as the root so the command was:

D:\Documents and Settings\Jonno>mysql -u root -p

During the setup I had opted to have the path to the MySQL binaries folder added as an environment variable, which is why I could run the command from my Windows home folder. The response came back:

Enter password: *******

I put in my password and got:

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.5.9 MySQL Community Server (GPL)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

I didn't want to enter any sql from the command line, so I entered:

mysql> exit

And got a very polite:


D:\Documents and Settings\Jonno>

Thus ended the lesson.

Thursday, February 17, 2011

Rasch Itembank Blog

So I have started a blog for my Rasch Itembank Project, and the address is:

The Learning Java blog will now be kept for java related issues, including issues related to data storage and access.

I am currently using a Derby database, and I had a few teething problems with that. Anyway after failing to find an ISP who would host a derby server for me, I have now found one who will host MySQL. So that will be a new learning curve for me.