This document explains how to install the MySQL Database Server on a server running Debian GNU/Linux 4.0 (etch). The Vermont Department of Taxes uses Debian in its test and production environments, but Debian is not a requirement for running MySQL, nor is Linux; the gateway has been tested successfully on Microsoft Windows XP with HypersonicSQL.
This document assumes that you have a server running the current version of Debian stable. Although, these instructions should apply to Ubuntu Linux as well. The Debian install process is well documented and fairly straightforward, so no Debian installtion instructions are provided here. The Vermont Department of Taxes suggests that you do a minimal install using the Network Install CD.
Update your packages database with this command:
# apt-get update
Install mysql-server
# apt-get install mysql-server
By default MySQL's root user has no password set. This means that anyone who can run the mysql binary can do whatever they wish to your database server. You should set the root password as soon as you finish the install step above.
$ mysql -u root
Enter the following into the MySQL monitor to change your password
mysql> set password = password('YOUR_NEW_PASSWORD_HERE');
Remove the ~/.mysql_history file. It contains all of your recent MySQL activity, including that plain text password you just typed in.
$ rm -f ~/.mysql_history