1. 程式人生 > >CentOS6.5系統下RPM包安裝MySQL5.6(親測可行)

CentOS6.5系統下RPM包安裝MySQL5.6(親測可行)

1.檢視作業系統相關資訊。

[[email protected] ~]# cat /etc/issue 
CentOS release 6.5 (Final) 
Kernel \r on an \m 
[[email protected] ~]# uname -a 
Linux linuxidc 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

2.建立需要下載rpm軟體包的目錄。
1 [[email protected] ~]# mkdir -p /taokey/tools

3.檢視下是否有系統自帶mysql的rpm包,如果有,需要刪除自帶的舊rpm包。
[[email protected] ~]# rpm -qa | grep mysql 
mysql-libs-5.1.71-1.el6.x86_64 
[[email protected] ~]# yum -y remove mysql-libs-5.1* 
[[email protected] ~]# rpm -qa | grep mysql 
[[email protected] ~]#

4.在MySQL官網下載安裝MySQL-5.6.21所需的rpm軟體包。
需要下載三個rpm軟體包:
MySQL-client-5.6.21-1.rhel5.x86_64.rpm  
MySQL-devel-5.6.21-1.rhel5.x86_64.rpm  
MySQL-server-5.6.21-1.rhel5.x86_64.rpm 
[

[email protected] ~]# cd /taokey/tools/ 
[[email protected] tools]# wget http://dev.mysql.com/Downloads/MySQL-5.6/MySQL-server-5.6.21-1.rhel5.x86_64.rpm 
[[email protected] tools]# wget http://dev.mysql.com/Downloads/MySQL-5.6/MySQL-devel-5.6.21-1.rhel5.x86_64.rpm 
[[email protected] tools]# wget http://dev.mysql.com/Downloads/MySQL-5.6/MySQL-client-5.6.21-1.rhel5.x86_64.rpm

5.下載完之後,安裝三個rpm軟體包。
[[email protected] tools]# rpm -ivh MySQL-server-5.6.21-1.rhel5.x86_64.rpm 
error: Failed dependencies:
        libaio.so.1()(64bit) is needed by MySQL-server-5.6.21-1.rhel5.x86_64
        libaio.so.1(LIBAIO_0.1)(64bit) is needed by MySQL-server-5.6.21-1.rhel5.x86_64
        libaio.so.1(LIBAIO_0.4)(64bit) is needed by MySQL-server-5.6.21-1.rhel5.x86_64
安裝MySQL-server報錯,原因是沒有安裝libaio,系統缺少libaio.so此軟體包,下邊yum安裝一下libaio.so軟體包。
[[email protected] tools]# yum install -y libaio 
[[email protected] tools]# rpm -ivh MySQL-server-5.6.21-1.rhel5.x86_64.rpm 
[[email protected] tools]# rpm -ivh MySQL-client-5.6.21-1.rhel5.x86_64.rpm  
Preparing...                ########################################### [100%] 
  1:MySQL-client          ########################################### [100%] 
[[email protected] tools]# rpm -ivh MySQL-devel-5.6.21-1.rhel5.x86_64.rpm  
Preparing...                ########################################### [100%] 
  1:MySQL-devel            ########################################### [100%]

6.修改配置檔案位置。
[[email protected] tools]# cp /usr/share/mysql/my-default.cnf /etc/my.cnf

7.初始化MySQL及修改MySQL預設的root密碼。
[[email protected] tools]# /usr/bin/mysql_install_db 
[[email protected] tools]# ps -ef | grep mysql 
root      2188    1  0 14:48 pts/1    00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/linuxidc.pid 
mysql    2303  2188 30 14:48 pts/1    00:00:02 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/linuxidc.err --pid-file=/var/lib/mysql/linuxidc.pid 
root      2331  1853  0 14:49 pts/1    00:00:00 grep mysql 
[[email protected] tools]# netstat -anpt | grep 3306 
tcp        0      0 :::3306                    :::*                        LISTEN      2303/mysqld
[[email protected] tools]# more /root/.mysql_secret 
# The random password set for the root user at Thu Apr  9 14:43:59 2015 (local time): F6K3v_xggFoLQeiN 
  
[[email protected] tools]# mysql -uroot -pF6K3v_xggFoLQeiN 
Warning: Using a password on the command line interface can be insecure. 
Welcome to the MySQL monitor.  Commands end with ; or \g. 
Your MySQL connection id is 1 
Server version: 5.6.21 
  
Copyright (c) 2000, 2014, 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> SET PASSWORD = PASSWORD('123.com');  
mysql> exit
Bye 
[[email protected] tools]# mysql -uroot -p123.com 
Warning: Using a password on the command line interface can be insecure. 
Welcome to the MySQL monitor.  Commands end with ; or \g. 
Your MySQL connection id is 6 
Server version: 5.6.21 MySQL Community Server (GPL) 
  
Copyright (c) 2000, 2014, 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>

8.設定MySQL服務開機自啟動。
[[email protected] tools]# chkconfig mysql on 
[[email protected] tools]# chkconfig mysql --list 
mysql          0:off  1:off  2:on    3:on    4:on    5:on    6:off

到此為止,使用RPM安裝MySQL5.6版本資料庫安裝完畢,謝謝大家。

相關推薦

CentOS6.5系統RPM安裝MySQL5.6可行

1.檢視作業系統相關資訊。 [[email protected] ~]# cat /etc/issue CentOS release 6.5 (Final)  Kernel \r on an \m  [[email protected] ~]# un

CentOS6.5系統RPM安裝MySQL5.6

1.檢視作業系統相關資訊。 [[email protected] ~]# cat /etc/issue CentOS release 6.5 (Final) Kernel \r on an \m [[email protected] ~]# una

rpm安裝mysql5.6.*版本

root per autoconf undle word sha eps auto 初始化 1、查看是否已經安裝Mysql rpm -qa | grep -i mysql #刪除已經安裝的Mysql程序 rpm -ev *****.rpm   

UEFI啟動的windows安裝Ubuntu雙系統可行

       不瞞你說,我和你一樣,曾經把ubuntu kylin14.04和win7/8/8.1安裝在一起,win7沒有問題,因為win7我用的是一臺比較老的電腦,不是UEFI啟動模式,但是我自己電腦上裝的正版win8/6.1是UEFI引導模式的,當我按照網上的教程裝好Ub

linux環境php安裝solr擴充套件總結

1、從http://pecl.php.net/package/solr下載最新版本。 我下載到/usr/tmp      cd /usr/tmp   wget https://pecl.php.net/get/solr-2.4.0.tgz

linux中安裝QQ、微信可行

對於使用Linux系統的同志們來說,沒有qq真的是太不習慣了,今天來解決這個問題! 有兩種方法 # sudo chmod +x TIM-X86_64.AppImage # ./TIM-X86_64.AppImage 經測試可行,但是無法記住密碼,其他

MySQL下載安裝詳情教程有效

1.下載MySQL資料庫可以訪問官方網站:https://www.mysql.com/ 2.點選DOWNLOADS模組下的Community模組下的MySQL Community Server進行下載。 由於目前最新版本是:MySQL Community

“ADB Interface”安裝失敗的問題解決方案可行

在學習Android的過程中,想要通過真機對應用程式進行除錯,電腦連線USB安裝驅動時並不順利,彈出提示為 ADB Interface驅動未安裝,如圖: Android ADB Interface是一個支援android和PC連線的程式,通過它Windows就可以自動識別並安裝驅動軟

史上最全 使用Breeze視覺化安裝Kubernetes叢集有效

使用該工具,將抹平普通使用者學習複雜的kubeadm部署技能學習曲線,體會到一鍵式部署Kubernetes叢集的樂趣! 適用作業系統為RHEL 7.4/7.5/7.6 或 CentOS 7.4/7.5/7.6 Note: 請不要把Breeze所在的部署主機加入部署叢集主機列表

解決win10VM12虛擬機器橋接模式不能上網的方法可行

本文的方法可解決如下兩個問題: 1。區域網中其他機器ping不通本機中的虛擬機器。 2。本機中的虛擬機器採用橋接模式不能上網,甚至主機也不能上網。 注意:自己區域網的IP起始地址及路由器地

centos6.5系統使用tar離線安裝mysql5.7

安裝環境:centos6 1、下載 2、解壓縮到/usr/local/ [root@localhost local]# cd /usr/local/soft/ [root@localhost soft]# tar zvxf mysql-5.

CentOs6.5系統MySQL-5.7.19安裝

mysql5.7安裝好長時間沒有更新了,今天給大家分享一波簡單的文檔,菜鳥的入門精神就是不斷的學習,不斷地找大神幫助!!!!在這裏今天給大家推薦一個博文地址:http://sumongodb.blog.51cto.com/好了!廢話少說,幹活走起來!!!!!!!!CentOs6.5下mysql5.7.19二進

Centos6.5安裝mysql5.7版本有效

Step1: 檢測系統是否自帶安裝mysql # yum list installed | grep mysql Step2: 刪除系統自帶的mysql及其依賴 命令: # yum -y remove mysql-libs.x86_64 Step3: 給CentOS新增rp

centos6.5系統安裝docker新手教程

Centos 6.5安裝docker教程 Docker 是 PaaS 提供商 dotCloud 開源的一個基於 LXC 的高階容器引擎,原始碼託管在 Github 上, 基於go語言並遵從Apache2.0協議開源。 Docker自2013年以來非常火熱,無論是從 git

Centos 離線rpm安裝mysql5.7

1 . 安裝新版mysql前,需將系統自帶的mariadb-lib解除安裝。 [root@wst-test02 bbders]# rpm -qa|grep mariadb mariadb-libs-5.5.44-2.el7.centos.x86_64 [r

centos6.5環境使用RPM離線安裝MariaDB 10.0.20

1. 進入MariaDB官網下載MariaDB需要的RPM包 2. 使用下載軟體下載所需要的RPM包, 總共4個, 並上傳到CentOS主機指定目錄. MariaDB-10.0.20-centos6-x86_64-server.rpm MariaDB-10.0.20-cen

centos6.5系統kdump工具的安裝和使用

2 crash除錯 2.1 安裝crash工具 yum -y install crash 2.2 安裝kernel-debuginfo包 下面的包可在10.18.*.*伺服器中獲取(\\10.18.*.*\software\其他\核心debug包\centos6.5 x64)或者網上下載 2.3 執

mac系統通過brew安裝mysql5.5

首先你的mac得先安裝過homebrew 開啟終端 輸入 brew install [email protected] 安裝完成後輸入 brew info [email protected] 發現缺少依賴cmake,CMake是一個跨平臺的安裝(

Linux(CentOS6.5)系統設定nginx開機自啟動

Nginx 是一個很強大的高效能Web和反向代理伺服器。下面介紹在linux下安裝後,如何設定開機自啟動。 首先,在linux系統的/etc/init.d/目錄下建立nginx檔案,使用如下命令: vi /etc/init.d/nginx 在指令碼中新增如下命令: *****

centos6.5系統將Python2.6.6升級為Python3.5.0

最近想學習深度學習,需要安裝TensorFlow,而TensorFlow一般基於python2.7或者python3.3+。我使用的Linux系統是centos6.5,其自帶的python版本號為2.6.6,所以需要將其升級為2.7或者3.3以上的版本。同時考慮到最新的TensorFlow版本及其他一些開