Installing MySQL 5.0
First we install MySQL 5.0 like this:
sudo apt-get install mysql-server mysql-client
Create a password for the MySQL user root (replace yourrootsqlpassword with the password you want to use):
sudo mysqladmin -u root password yourrootsqlpassword
Then check with
netstat -tap | grep mysql
on which addresses MySQL is listening. If the output looks like this:
tcp 0 0 localhost.localdo:mysql *:* LISTEN 2713/mysqld
which means MySQL is listening on localhost.localdomain only, then you’re safe with the password you set before. But if the output looks like this:
tcp 0 0 *:mysql *:* LISTEN 2713/mysqld
you should set a MySQL password for your hostname, too, because otherwise anybody can access your database and modify data:
sudo mysqladmin -h serverip -u root password yourrootsqlpassword