Debian Lenny - Installing MySQL
Installing MySQL on Debian Lenny is very simple using the 'aptitude' package manager.
This article will go through the install process and you will have a database server up and running in no time.
MySQL install
To begin with, a simple MySQL install:
sudo aptitude install mysql-server mysql-client libmysqlclient15-dev
Note that we have installed the development libs and headers with the 'libmysqlclient15-dev' package - you can leave that out but I have found that they are useful in many siutations.
MySQL Password
During the installation of MySQL, you will be presented with the option to install a password:

Setting the MySQL Root password is a recommended step in setting up your Slice. However, it is, of course, up to you.
Should you decide that protecting your production database is a good idea, then simply enter your chosen password as directed.
Unlike previous Debian releases, Lenny asks for a confirmation of the password (which is a good thing!):

InnoDB
If you are not going to use InnoDB with your MySQL databases, then it is a good idea to turn it off right at the start. It uses a lot of memory and, if not going to be used, this is wasted memory.
Open the main MySQL config file:
sudo nano /etc/mysql/my.cnf
Search my.cnf for the heading:
# * InnoDB
Then, to turn off InnoDB, simply uncomment (remove the #) on this line:
skip-innodb
Done. It really is as simple as that.
Ben B.


Article Comments:
annon commented Fri Apr 24 12:29:43 UTC 2009:
"Unlike previous Ubuntu releases, Hardy asks for a confirmation of the password (which is a good thing!):"
ubuntu or debian? :-)
Ben B commented Wed Apr 29 00:39:15 UTC 2009:
Thanks for pointing that out annon! Fixed!
Lex Sheehan commented Tue May 12 15:00:19 UTC 2009:
You may want to mention that InnoDB provides transactional support.
kinjal dixit commented Thu Sep 17 10:25:38 UTC 2009:
innodb is also required if you need referential integrity enforced.