如何用CentOS7安装MySQL5.7
1个回答
展开全部
好几种安装方法,有二进制安装,yum安装,rpm包安装。
#二进制安装链接
MySQL :: MySQL 5.6 Reference Manual :: 2.2 Installing MySQL on Unix/Linux Using Generic Binaries
https://dev.mysql.com/doc/refman/5.6/en/binary-installation.html
#yum安装
shell> groupadd mysql
shell> useradd -r -g mysql -s /bin/false mysql
shell> cd /usr/local
shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd 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
shell> bin/mysqld_safe --user=mysql &
# Next command is optional
shell> cp support-files/mysql.server /etc/init.d/mysql.server
#YUM安装
MySQL :: MySQL 5.6 Reference Manual :: 2.5.1 Installing MySQL on Linux Using the MySQL Yum Repository
https://dev.mysql.com/doc/refman/5.6/en/linux-installation-yum-repo.html
#RPM包安装
MySQL :: MySQL 5.6 Reference Manual :: 2.5.5 Installing MySQL on Linux Using RPM Packages from Oracle
https://dev.mysql.com/doc/refman/5.6/en/linux-installation-rpm.html
###还可以看看MariaDB数据库的安装和使用。
#www.linuxprobe.com/chapter-18.html
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询