The University of Aberdeen
The Computing Science Department

MySQL

Go to http://www.mysql.com/downloads and select the latest stable version to download along with the MySql Workbench. Also be sure to go over the 'readme' file in the mysql directory after you install the programme.

Download MySQL 'Windows Essentials' version to your machine, or other suitable version for your platform, whether it be 32 or 64 bit.

Start up of mysql install screen

Run the setup executable following the main suggestions. Choose the typical components, review the choices and see that it installs under 'program files', which is fine.

Configure it for the typical parts

After the advert for the enterprise edition and the monitor service, you then will see options to configure the server.

Configure the mysql instance

You can untick the box to register mysql as you don't need to do this.

Choose 'developer' and 'multifunctional' for the settings of the components, and use the default options for the tablespace settings, and 'DSS/OLAP' for the number of concurrent sessions, which should be around 15 or so.

Tick the box for 'tcp/ip networking and leave the option for firewall exception unticked and the port set to 3306. Leave the strict mode box ticked.

tick the box for tcp/ip networking


Use the standard set of characters and have mysql start as a windows service with the name of mysql, and do tick the box to add the bin directory to the path variable.

Start mysql as a service and add the bin to the path variable

Enter a root password. If you do not, then YOU WILL HAVE PROBLEMS later. You MUST enter a root password. Make it memorable and simple. This is running on your machine, you're unlikely to have people trying to hack your laptop so keep it simple. Even re-use a password that you use somewhere else.

Warning: If you do not enter a root password, or you forget the root password, there is no easy way to set a new one. This is a difficult and painful process, so take the time to do it right.

Enter a root password: keep it simple and memorable

Press 'next' to configure the server and start the service. If all is well, then click 'finish' to complete, otherwise backup and change settings. When you're done, then open a command prompt and enter 'mysql' you should be told that you don't have authorised access to use the service. Do it again, but this time type:

mysql -u root -p

and press return and then enter your password when requested. This should now work and confirm your password works correctly.

If you forget to put in the password, then you will need to uninstall MySQL and then go and delete the data directories, which are not uninstalled. After that you can reinstall MySQL. If you forget to remove the data directories first, then you'll find it has kept all of your previous settings.

This should leave you with a MySQL server that starts as a service under your system Be sure to set it to start automatically when your laptop is booted to avoid any hassles.

Install MySQL Workbench

Install the latest version of MySQL Workbench that is at least version 5.2.x (either GA or Developer Verision) to let you control the server and add databases, plus edit them as needed all from one useful application.

Install the Appropriate Driver for MySQL 

Depending upon whether you're using Ruby or Java you need to now add the appropriate driver for your system, or both if you wish.

Add the Java Driver

Add the Ruby Driver

Open a console and add the appropriate gem with

gem install mysql

Remember, if you're on a mac, then you need to use 'sudo gem install mysql' instead, and if you're behind the university proxy, then you need to add the proxy flag with --http-proxy http://proxy.abdn.ac.uk:8080