Chinaunix首页 | 论坛 | 博客
  • 博客访问: 34987
  • 博文数量: 9
  • 博客积分: 1415
  • 博客等级: 上尉
  • 技术积分: 110
  • 用 户 组: 普通用户
  • 注册时间: 2008-06-24 10:34
文章分类

全部博文(9)

文章存档

2010年(1)

2008年(8)

我的朋友
最近访客

分类: Mysql/postgreSQL

2008-06-24 10:55:04

编译安装 mysql : 
 
     shell> groupadd mysql
     shell> useradd -g mysql mysql
     shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
     shell> cd mysql-VERSION
     shell> ./configure --prefix=/infowarelab/mysql --datadir=/infowarelab/mysql/data
     shell> make
     shell> make install
     shell> cp support-files/my-medium.cnf /etc/my.cnf
     shell> cd /infowarelab/mysql

修改 bin/mysql_install_db 如下 :
指定 ldata=/infowarelab/mysql/data

     shell> bin/mysql_install_db --user=mysql
     shell> chown -R root  .
     shell> chown -R mysql data
     shell> chgrp -R mysql .
     shell> bin/mysqld_safe --user=mysql &

cp /infowarelab/mysql/support-files/mysql.server /etc/init.d/mysql
chmod +x /etc/init.d/mysql

修改 /etc/init.d/mysql 如下:
指定
basedir=/infowarelab/mysql
datadir=/infowarelab/mysql/data


chkconfig --add mysql
chkconfig --level 345 mysql on

阅读(697) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~