Install MySQL Server
You can install MySQL Server from command line in Ubuntu. First you need to open terminal window and type the following command.
sudo apt-get update sudo apt-get install mysql-server mysql-common mysql-client
This command will ask confirmation from you before run installation. So press ‘y’ key to start the mysql server installation.
after installation is finish it will prompt a window which will ask from you the new password for “root” user of MySQL Server. It is not mendatory but for security you should provide a secure password here.
To start mysql server
type following command in terminal window
sudo mysql -u root -p
it will ask for MySQL “root” user password then you can logged in mysql server.
Uninstall MySQL Server
The process of remove the MySQL Server is so easy as its installation. Please type following command in termial to remove the MySQL Server from Ubuntu.
sudo apt-get remove --purge mysql-server mysql-client mysql-common sudo apt-get autoremove sudo apt-get autoclean