This will cover the installation and configuration of MySQL
Install MySQL
The installation will ask for the root password for the database
sudo apt-get -y install mysql-server
Update the my.cnf file
Update the database location and the IP address to bind to
sudo vi /etc/mysql/my.cnf
...
datadir = /mnt/apps/mysql-data
...
bind-address = 0.0.0.0
...
/media/FreeAgent/store/apps
Upgrading
This is probably taken care when you upgrade a package, but it may need to be manually done.
sudo mysql_upgrade -h localhost -u root -p
For my upgrade I then had to repair some tables
mysql -u root -p mysql
REPAIR TABLE `help_category`;
REPAIR TABLE `help_keyword`;
REPAIR TABLE `help_topic`;
REPAIR TABLE `proc`;
REPAIR TABLE `time_zone_name`;
Now restart
sudo /etc/init.d/mysql restart
Importing tables in Windows
mysql -u username -ppassword database_name < data.sql