Mysql Database Server Installation and Configuration in Ubuntu

Mysql Database Server Installation and Configuration in Ubuntu

Mysql is a  simple used Sql Database server that based in client/server implementation.
 

Installing Mysql database in Ubuntu

1. Open terminal and type this command 
sudo apt-get install mysql-server mysql-client libmysqlclient12-dev
2. MySQL initially only allows connections from the localhost (127.0.0.1). We'll need to remove that restriction if you wish to make it accessible to everyone.

Open the file /etc/mysql/my.cnf
sudo nano /etc/mysql/my.cnf
3. Find the line bind-address = 127.0.0.1 and comment it out
...
#bind-address = 127.0.0.1
...
4. MySQL comes with no root password as default. This is a huge security risk. You'll need to set one.
mysqladmin -u root password your-new-password
mysqladmin -h root@local-machine-name -u root -p password your-new-password
/etc/init.d/mysql restart
source : http://www.debianadmin.com/mysql-database-server-installation-and-configuration-in-ubuntu.html