Install MySQL on Ubuntu 7.10 (Gutsy Gibbon)

To start using MySQL on Ubuntu, you first have to install it. You may do so by running the following commands in your favorite shell:

sudo apt-get install mysql-server

sudo apt-get install mysql-client

sudo apt-get install mysql-admin

sudo apt-get install mysql-query-browser

This is all you have to do. Now that wasn’t so hard, was it?

Connect to MySQL Remotely

If you would like to allow MySQL to receive connections from outside the server, such as other computers on the network, just modify the file /etc/mysql/my.cnf by commenting out bind-address = For example, run the following command (replace vim with the editor of your choice):

sudo vim /etc/mysql/my.cnf

Then look for the following line

bind-address =

And change it to

#bind-address =

Then save the file and run the following command in shell

sudo /etc/init.d/mysql restart

You should now be able to connect to MySQL from other machines.

Default Location of MySQL Data Files

In Ubuntu, MySQL stores its data in the /var/lib/mysql directory by default. Hat tip: Where to Put MySQL Files? Another way to find current location for MySQL files is from the config file:

grep -i datadir /etc/mysql/my.cnf


less /etc/mysql/my.cnf | grep -i datadir

What this command does is read the configuration file and tells you where files are located. Of course, you first need to find out where MySQL configuration file is in your distribution.

One Response to Install MySQL on Ubuntu 7.10 (Gutsy Gibbon)

  1. Pingback: slapjack » links for 2008-01-16

%d bloggers like this: