This tutorial will guide you to install MySql in Ubuntu. If you want a guide to install Apache and PHP in Ubuntu before installing MySql, they are available here:
How to install PHP
How to install Apache Web server
Follow these steps on to install MySql in Ubuntu:
1. Open Terminal and run below command.
sudo apt-get install mysql-server
2. Give the root password.
3. Wait for the installation to finish.
4. The installer itself start the MySql server. To check whether the MySql server is running or not, run below command.
sudo netstat -tap | grep mysql
5. To make sure, your MySql installation works fine with Apache and PHP, run below command. It will install necessary modules to connect to a MySql database through PHP using Apache.
sudo apt-get install libapache2-mod-auth-mysql php5-mysql
6. Installation is completed.