centos6.4 源码安装mysql5.5

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

安装依赖库

yum install gcc-c++

yum install bison cmake

yum install ncurses-libs

yum install ncurses-devel

yum install automake

创建用户

/usr/sbin/groupadd MysqL
/usr/sbin/useradd -g MysqL MysqL

解压源码包,编译安装

tar zxf MysqL-5.5.49.tar.gz

cd MysqL-5.5.49/

cmake .

make && make install

修改相关目录权限,并初始化数据库

cd /usr/local/MysqL

chown -R MysqL .

chgrp -R MysqL .

scripts/MysqL_install_db --user=MysqL

chown -R root .

chown -R MysqL data

启动服务,并检查是否能正常运行

bin/MysqLd_safe --user=MysqL &

查看MysqL进程是否启动,

cp support-files/MysqL.server /etc/init.d/MysqLd

chmod 755 /etc/init.d/MysqLd

ll /etc/init.d/MysqLd

用service启动MysqL

export PATH=/usr/local/MysqL/bin:$PATH

source /etc/profile

增加链接

ln -s /var/lib/MysqL/MysqL.sock /tmp/MysqL.sock

service MysqLd start/stop/restart

MysqL -u root

原文链接:https://www.f2er.com/centos/382165.html

猜你在找的CentOS相关文章