MySQL is free, powerful and widely available on web servers.
- Download mysql-essential-4.1.9-win32.msi from www.mysql.com
- run the installer application. You can install it as a windows service or as a separate instance so you could start
MySQL on different occasions with a different data directory. If, for some reason you need to do this then you need to choose
non default options when you run the installer application:
- choose "custom" --> next
- change destination, put in J:\mysql (create folder - J: is the hard disk in this example) --> next
- --> install
- choose "skip sign-up" --> next
- uncheck "configure now" --> finish
- There should be no windows service installed (check Settings / control panel / services)
- You then need to start the MySQL server and create the database and user. If you set it up as a Windows Service you might
have set it to start whenever windows does. Control this Settings / control panel / services.
If you didn't set it up as a windows service then you need to start up the server: run mysql\bin\mysqld in a command prompt window
the window will hang, in which case start another command prompt
if you have previously run mysql on this hard disk partition you may get a complaint when you run this. In this case
you might have to be more specific to stop it using previous settings ie
mysql\bin\mysqld --port=3306 --basedir=\mysql --datadir=\mysql\data
- mysql\bin\mysql --user=root
should bring up the mysql command line interface. Type:
- show databases;
- create database phd1;
should do what it says.
to go back to dos prompt
- mysql\bin\mysqladmin --user=root password xyz
this changes the root password to xyz - don't forget it!
- mysql\bin\mysqladmin --user=root --password=xyz password abc
this changes the root password from xyz to abc - don't forget that either!
- mysql\bin\mysqladmin --user=root --password=abc shutdown
stops the mysql server running
- There is an extra complication if you are using a newer version of MySQL (ie v. 4.1.9) with older version of php
(as used in the beta version of dyncd).
This is caused by the changed password hashing used. To get round the problem you will have to define the user in
the mysql command line interface and set the password type to old_password(). You will then have to run tmpmaker2.php
which does not have the section where the user is defined from scratch. To set up the user you need to start mysqld
as above and log into mysql as root. then create the user as follows:
>grant all privileges on *.* to username@localhost;
>set password for username@localhost = old_password('secret');