1.下载软件包
下载链接:https://dev.mysql.com/downloads/mysql/5.6.html#downloads
centos6--MySQL-5.6.35-1.el6.x86_64.rpm-bundle.tar
centos7--MySQL-5.6.35-1.el7.x86_64.rpm-bundle.tar
选择对应版本,否则会出现依赖不满足问题。
rpm -qa | grep -i mysql
2.解压安装数据库
说明:以-Uvh安装是为了保险起见;测试发现依以下顺序安装是没有问题的,但如果出现某个包无法安装则先跳过放最后安装。
tar
-xf MySQL-5.6.36-1.el6.x86_64.rpm-bundle.
rpm -Uvh MySQL-client-5.6.36-1.el6.x86_64.rpm
rpm -Uvh MySQL-shared-5.6.36-1.el6.x86_64.rpm
rpm -Uvh MySQL-devel-5.6.36-1.el6.x86_64.rpm
rpm -Uvh MySQL-shared-compat-5.6.36-1.el6.x86_64.rpm
rpm -Uvh MySQL-embedded-5.6.36-1.el6.x86_64.rpm
rpm -Uvh MySQL-test-5.6.36-1.el6.x86_64.rpm
rpm -Uvh MySQL-server-5.6.36-1.el6.x86_64.rpm
3.初始化MySQL及设置密码
1[root@localhost rpm]# /usr/bin/mysql_install_db
2 [root@localhost rpm]# service mysql start
3 [root@localhost rpm]# cat /root/.mysql_secret #查看root账号密码
4 # The random password set for the root user at Wed Dec 11 23:32:50 2013 (local time): qKTaFZnl
5 [root@localhost ~]# mysql -uroot –pqKTaFZnl 6 mysql> SET PASSWORD = PArpm -Uvh MySQL-test-5.6.46-1.el7.x86_64.rpm
warning: MySQL-test-5.6.46-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
error: Failed dependencies:
perl(Data::Dumper) is needed by MySQL-test-5.6.46-1.el7.x86_64
SSWORD('123456');
设置密码为123456 7
mysql> exit 8 [root@localhost ~]# mysql -uroot -p123456
centos 7.3 安装MySQL-embedded-5.6.36-1.el6.x86_64.rpm `碰到问题
error: Failed dependencies:
libnuma.so.1()(64bit) is needed by MySQL-embedded-5.6.46-1.el7.x86_64
libnuma.so.1(libnuma_1.1)(64bit) is needed by MySQL-embedded-5.6.46-1.el7.x86_64
libnuma.so.1(libnuma_1.2)(64bit) is needed by MySQL-embedded-5.6.46-1.el7.x86_64
解决方案: 安装:yum install numactl
warning: MySQL-test-5.6.46-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
error: Failed dependencies:
perl(Data::Dumper) is needed by MySQL-test-5.6.46-1.el7.x86_64
解决方案: 安装: yum install perl yum -y install autoconf
网友评论