加入收藏 | 设为首页 | 会员中心 | 我要投稿 520站长网 (https://www.520shu.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MySql教程 > 正文

CentOS6下怎样用RPM方式安装MySQL5.6

发布时间:2022-01-20 04:45:08 所属栏目:MySql教程 来源:互联网
导读:这篇文章主要介绍CentOS6下怎么用RPM方式安装MySQL5.6,在日常操作中,相信很多人在CentOS6下怎么用RPM方式安装MySQL5.6问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答CentOS6下怎么用RPM方式安装MySQL5.6的疑惑有所帮助!
       这篇文章主要介绍“CentOS6下怎么用RPM方式安装MySQL5.6”,在日常操作中,相信很多人在CentOS6下怎么用RPM方式安装MySQL5.6问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”CentOS6下怎么用RPM方式安装MySQL5.6”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!
 
      CentOS 6 下RPM方式安装MySQL5.6
  
1. 下载Linux对应的RPM包,如:CentOS6.7_64对应的RPM包,如下:
[root@mysql ~]# ll
总用量 113808
-rw-------. 1 root root 1434 12月 13 18:47 anaconda-ks.cfg
-rw-r--r--. 1 root root 42556 12月 13 18:47 install.log
-rw-r--r--. 1 root root 10033 12月 13 18:45 install.log.syslog
-rw-r--r--. 1 root root 23135399 12月 13 18:56 MySQL-client-5.6.25-1.linux_glibc2.5.x86_64.rpm
-rw-r--r--. 1 root root 4586217 12月 13 18:56 MySQL-devel-5.6.25-1.linux_glibc2.5.x86_64.rpm
-rw-r--r--. 1 root root 88715219 12月 13 18:56 MySQL-server-5.6.25-1.linux_glibc2.5.x86_64.rpm
 
 
2. 检查MySQL及相关RPM包,是否安装,如果有安装,则移除(rpm –e 名称)
[root@mysql ~]# rpm -qa | grep -i mysql
mysql-libs-5.1.73-5.el6_6.x86_64
[root@mysql ~]# yum -y remove mysql-libs*
已加载插件:fastestmirror, refresh-packagekit, security
设置移除进程
解决依赖关系
。。。。。
完毕!
 
 
3. 安装MySQL
[root@mysql ~]# rpm -ivh MySQL-server-5.6.25-1.linux_glibc2.5.x86_64.rpm
Preparing... ########################################### [100%]
1:MySQL-server ########################################### [100%]
warning: user mysql does not exist - using root
warning: group mysql does not exist - using root
Support MySQL by buying support/licenses at http://shop.mysql.com
 
 
New default config file was created as /usr/my.cnf and
will be used by default by the server when you start it.
You may edit this file to change server settings
 
 
[root@mysql ~]# rpm -ivh MySQL-devel-5.6.25-1.linux_glibc2.5.x86_64.rpm
Preparing... ########################################### [100%]
1:MySQL-devel ########################################### [100%]
[root@mysql ~]# rpm -ivh MySQL-client-5.6.25-1.linux_glibc2.5.x86_64.rpm
Preparing... ########################################### [100%]
1:MySQL-client ########################################### [100%]
  
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
 
 
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
 
 
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
说明: 出现mysql> 表示一切顺利成功。
mysql> SET PASSWORD = PASSWORD('123456'); --设置密码为123456
 
 

(编辑:520站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读