MySQL is a most popularly used database for the web applications. It is a open-source relational database.
This post covers a installation of a MySQL on Ubuntu Linux and also covers creation of database, users and adding user for database.
make sure your package management tools are up-to-date. Also make sure you install all the latest software available.
sudo apt-get update sudo apt-get dist-upgrade
After a few moments (or minutes, depending on the state of your system), you’re ready to install MySQL. ~ By default, recent Ubuntu/Debian systems install a MySQLServer from the 5-branch. This is a good thing, so don’t worry.
First, install the MySQL server and client packages:
sudo apt-get install mysql-server mysql-client
When done, you have a MySQL database read to rock ‘n roll. However, there’s more to do.
You need to set a root password, for starters. MySQL has it’s own user accounts, which are not related to the user accounts on your Linux machine. By default, the root account of the MySQL Server is empty. You need to set it. Please replace ‘mypassword’ with your actual password and myhostname with your actual hostname.
sudo mysqladmin -u root -h localhost password 'mypassword' sudo mysqladmin -u root -h myhostname password 'mypassword'
Now, you probably don’t want just the MySQL Server. Most likely you have Apache+PHP already installed, and want MySQL to go with that. Here are some libraries you need to install to make MySQL available to PHP:
sudo apt-get install php5-mysql Enjoy !!