记录一个源码安装mysql5.6的方法

时间:2022-03-12 06:19:02

https://www.jb51.net/article/118853.htm

如果之前源码安装过mysql5.6的话,卸载方法如下:
rm -rf /var/lib/mysql/
rm -rf /usr/local/mysql
rm -rf /etc/init.d/mysql

源码安装实践记录:

wget https://cdn.mysql.com/archives/mysql-5.6/mysql-5.6.27-linux-glibc2.5-x86_64.tar.gz

tar -zxf mysql-5.6.27-linux-glibc2.5-x86_64.tar.gz

mv  mysql-5.6.27-linux-glibc2.5-x86_64 /usr/local/mysql

groupadd mysql

useradd -r -g mysql mysql

cd /usr/local/mysql

yum -y install perl*              #客官如果执行下面这步报错,就执行这边,否则请跳过这个命令。

./scripts/mysql_install_db --user=mysql

chown -R root:root ./

cp support-files/mysql.server /etc/init.d/mysql