Home » 维护经验

Linux 下MySQL的安装配置和优化

25 09月 2008 286 views No Comment Print This Post Print This Post Email This Post Email This Post

安装

在Debian/Ubuntu下:

apt-get install -server-5.0

在CentOS下:

yum install -y -server

配置

主要是中文环境配置,配置全面缺省支持UTF-8。修改的配置文件/etc//my.cnf,在[mysqld] 和 [client]段都加入如下指令:

default-character-set=utf8

优化

一般包括3个服务,, mysqld-ndb, -ndb-mgm。服务就是我们常有的数据库服务,mysqld-ndb是 cluster用的,-ndb-mgm是 cluster的管理用的,我们在VPS上一般用不到 cluster,所以应该禁止掉-ndb和-ndb-mgm。

在Debian/Ubuntu下:

update-rc.d -f -ndb remove
update-rc.d -f -ndb-mgm remove

在CentOS下:

chkconfig -ndb off
chkconfig -ndb-mgm off

Related Posts

Tags: ,

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.