您的位置:首页 > 运维架构 > Linux

CentOS 5.5 安装MySQL 5.5.8初体验

2010-12-18 15:54 477 查看
http://dev.mysql.com/doc/refman/5.5/en/installing-source-distribution.html

参考文章MySQL官方教程

安装后使用supersmack测试记录 对MYSQL进行压力测试 http://blog.csdn.net/pengyouchuan/archive/2010/12/18/6084007.aspx
MySQL5.5源码安装和以前的5.1有区别,5.1使用autotool编译,新版的5.5使用CMake编译

需要先安装cmake
http://www.cmake.org/cmake/resources/software.html
下载源码包,安装cmake方法和其他的安装相同,解压,配置,编译,安装

按照MySQL官方文档进行,顺利完成,根据自己的datadir安装数据库,我的安装/home/mysql/data下

# Preconfiguration setup

shell> [code]groupadd mysql



shell>
useradd -r -g mysql mysql



# Beginning of source-build specific instructions

shell>
tar zxvf mysql-
VERSION


.tar.gz



shell>
cd mysql-
VERSION





shell>
cmake .



shell>
make



shell>
make install



# End of source-build specific instructions

# Postinstallation setup

shell>
cd /usr/local/mysql



shell>
chown -R mysql .



shell>
chgrp -R mysql .



shell>
scripts/mysql_install_db --user=mysql



shell>
chown -R root .



shell>
chown -R mysql data



# Next command is optional

shell>
cp support-files/my-medium.cnf /etc/my.cnf



shell>
bin/mysqld_safe --user=mysql &



# Next command is optional

shell>
cp support-files/mysql.server /etc/init.d/mysqld



shell>
chkconfig --add mysqld



shell>
chkconfig --level 2345 mysqld on



shell>
service mysqld start



[/code]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: