Debian Lenny - Installing MySQL

来源:互联网 发布:网络推广手法 编辑:程序博客网 时间:2024/05/21 10:33

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 situations.

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.

原文地址:http://articles.slicehost.com/2009/4/7/debian-lenny-installing-mysql