How to Install Mysql on Ubuntu?

Install mysql

If you have not already done so in the install php step, make sure that your installer is up to date:

sudo aptitude update

To install mysql with the necessary modules:

sudo aptitude install mysql-client mysql-server

The installation process will ask you to create a root password for mysql. You will need this password in the next step.

Install PHP on Ubuntu Server

Make sure that your installer is up to date:
sudo aptitude update
To install php5 with the necessary modules:

sudo aptitude install php5 php5-mhash php5-mcrypt php5-curl
php5-cli php5-mysql php5-gd