logo

Navigation:First_Community->Computer->Database Goto:New TopicSettingSearch
centos下mysql安装
Posted by: maomao Date: April 15, 2008 11:07AM
#下载mysql cd /usr/local/src;

CopyRight owned by the original author.--(www.MegaEntry.com)

# wget http://dev.mysql.com/get/Downloa ... //mysql.ntu.edu.tw/#解压mysql二进制 到/usr/local下面 cd /usr/local/tar zxf src/mysql-5.*.tar.gz#建立mysql链接的目录,方便以后升级二进制版本,其中数据放在/usr/local/data下面

CopyRight owned by the original author.--(www.MegaEntry.com)

cd /usr/localmkdir datamkdir mysqlcd mysql#建立mysql与data的链接ln -s ../data .

CopyRight owned by the original author.--(www.MegaEntry.com)

ln -s ../mysql-*/* .cd ../mysql-*/ln -s ../data varcd ../mysql

CopyRight owned by the original author.--(www.MegaEntry.com)

#安装mysql需要的系统运行库yum -y install compat-libstdc -33#下载mysql的配置文件cd /usr/local/mysql

MegaEntry - Social networking and discussion site!

wget http://www1.webterren.com:8080/dl/my.cnf-2G-combin/bin/mv -f my.cnf-2G-combin /etc/my.cnf#权限useradd -d /usr/local/mysql/data mysqlmkdir /home/temp; chown mysql:mysql /home/temp

MegaEntry - Social networking and discussion site!

#初始化数据库./scripts/mysql_install_db#自动运行,配置成服务/bin/cp -f support-files/mysql.server /etc/init.d/mysqld

MegaEntry - Social networking and discussion site!

chown -R mysql:mysql data ../data#启动mysql/etc/init.d/mysqld start#设置服务启动chkconfig mysql.server on

MegaEntry - Social networking and discussion site!

#加入mysql到路径echo pathmunge /usr/local/mysql/bin after > /etc/profile.d/mysql.sh#执行一下,保证mysql在路径环境变量中. /etc/profile

CopyRight owned by the original author.--(www.MegaEntry.com)

转自:红联Linux


Reply To This Message
Subject: 

Copyright 2005-2006 megaentry,All Rights Reserved
IE 6.0 or above is perfect