centos6 编译安装mysql 5.1

前端之家收集整理的这篇文章主要介绍了centos6 编译安装mysql 5.1前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

1 安装依赖库和创建用户

yum install ncurses-devel -y

useradd -M -s /sbin/nologin MysqL

2 解压文件及安装

tar zxvf MysqL-5.1.73.tar.gz@H_502_9@cd MysqL-5.1.73@H_502_9@./configure --prefix=/usr/local/MysqL@H_502_9@make@H_502_9@make install

3 设置目录访问权限和拷贝配置及启动文件

chown -R MysqL.MysqL /usr/local/MysqL/@H_502_9@cp support-files/my-medium.cnf /etc/my.cnf@H_502_9@/usr/local/MysqL/bin/MysqL_install_db --user=MysqL@H_502_9@chown -R root /usr/local/MysqL/@H_502_9@chown -R MysqL /usr/local/MysqL/var/@H_502_9@cp support-files/MysqL.server /etc/init.d/MysqLd@H_502_9@chmod +x /etc/init.d/MysqLd@H_502_9@chkconfig MysqLd on

4 加入环境变量

echo 'PATH=/usr/local/MysqL/bin/:$PATH' >>/etc/profilesource /etc/profile

猜你在找的CentOS相关文章