Sunday, January 16, 2011

How to install MySQL on Ubuntu/Debian

I recently installed MySql server-client in my Ubuntu 10.10.
It may seem easy for some, but for others, installing MySQL on Ubuntu or Debian Linux is not an easy task. This article explains to you how to install the MySQL Server and Client packages on a Ubuntu/Debian system.

First of all, 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

Wait for some result.

By default, recent Ubuntu/Debian systems install a MySQL Server 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 ready to use. However, there’s something more to do.

You need to set a root password. 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. Just type your desired password when asked for it. Also retype it.
Voila ! You're done.

No comments:
Write comments