Here we will see how to install LAMP(Linux Apache MySQL and PHP) in Ubuntu 12 using commands.
LAMP is used to run PHP scripts and use data which is stored in database(MySql) with those scripts.
To do this you will need command prompt that is your terminal and root access to your system.
To open terminal in Ubuntu 12 open Unity sidebar and click on first icon on it or click windows key, and search for terminal.
Type "su" and then enter your password. Then follow these commands.
This will too ask you two confirmation for which write "y" and click "Enter".
sudo apt-get install mysql-server
Now this time it will ask you a confirmation and if you press "y+Enter" it will start installing mysql server on your system.
It will then ask password for the root user.(Be careful while entering password at this stage as you will need this later on.)
And now you are done installing Mysql server, if you want you can check it by opening a new tab in your terminal (Ctrl+Shift+t).
Enter "mysql -u root -p" in your terminal and press enter, you will be asked for the password. Enter password which you set during installation.
You will see "mysql>" in your terminal and you are now able to use mysql.
thank u i was searching for same.