centos 7操作系统中安装tar.gz形式的mysql数据库
本博文安装过程在VMware workstation 10.0.3的虚拟机中进行
安装centos 7虚拟机
安装虚拟机过程中,在选择软件组的时候选择Mininal Install安装,其他选项按默认值设置。Minimal Install如下图所示:
下载mysql community server tar.gz压缩包
访问mysql官网,下载(http://dev.mysql.com/downloads/mysql/)社区版mysql服务器。请选择Linux - Generic版本。
Linux - Generic (glibc 2.5) (x86, 64-bit), Compressed TAR Archive | 5.6.21 | 297.1M | ||
(mysql-5.6.21-linux-glibc2.5-x86_64.tar.gz) | MD5:
|
|||
Linux - Generic (glibc 2.5) (x86, 32-bit), Compressed TAR Archive | 5.6.21 | 289.0M | ||
(mysql-5.6.21-linux-glibc2.5-i686.tar.gz) | MD5:
|
安装mysql community server(root安装)
yum remove mariadb-libs -y
yum install net-tools libaio perl-Data-Dumper -y
tar -zxvf mysql-5.6.21-linux-glibc2.5-x86_64.tar.gz
mv mysql-5.6.21-linux-glibc2.5-x86_64 /usr/local/mysql
cd /usr/local/mysql
groupadd -r mysql
useradd -r -m -g mysql mysql
chown -R mysql .
chgrp -R mysql .
./scripts/mysql_install_db --user=mysql
chown -R root .
chgrp -R mysql .
chown -R mysql data
bin/mysqld_safe --user=mysql &
#bin/mysqladmin version