Centos6.5使用光盤掛載鏡像配置yum源安裝mysql5.7教程

本文主要給大家介紹Centos6.5使用光盤掛載鏡像配置yum源安裝MySQL5.7教程,文章內(nèi)容都是筆者用心摘選和編輯的,具有一定的針對(duì)性,對(duì)大家的參考意義還是比較大的,下面跟筆者一起了解下Centos6.5使用光盤掛載鏡像配置yum源安裝mysql5.7教程吧。

創(chuàng)新互聯(lián)專業(yè)為企業(yè)提供襄州網(wǎng)站建設(shè)、襄州做網(wǎng)站、襄州網(wǎng)站設(shè)計(jì)、襄州網(wǎng)站制作等企業(yè)網(wǎng)站建設(shè)、網(wǎng)頁設(shè)計(jì)與制作、襄州企業(yè)網(wǎng)站模板建站服務(wù),十載襄州做網(wǎng)站經(jīng)驗(yàn),不只是建網(wǎng)站,更提供有價(jià)值的思路和整體網(wǎng)絡(luò)服務(wù)。

一、光盤掛載鏡像配置yum源

    1、掛載光盤鏡像

    mount /dev/cdrom /media           #將光盤系統(tǒng)文件掛載到 /media文件夾下

    Centos6.5使用光盤掛載鏡像配置yum源安裝mysql5.7教程

    2、配置光盤yum源 repo配置文件

    cd /etc/yum.repo.d    #切換到y(tǒng)um配置文件目錄

    mkdir repos_bak      #創(chuàng)建repos配置文件備份文件夾

    mv *.repo repos_bak   #將原repo配置文件移動(dòng)到repos_bak備份文件夾中

    touch Centos-Base.repo #創(chuàng)建Centos-Base.repo文件

    vi /Centos-Base.repo  #編輯Centos-Base.repo文件

    Centos6.5使用光盤掛載鏡像配置yum源安裝mysql5.7教程    

    

    [base]

    name=Base

    baseurl=file:///media

    gpgcheck=0

    Centos6.5使用光盤掛載鏡像配置yum源安裝mysql5.7教程

    

    yum clean all  #清除緩存

    yum makecache  #建立新緩存

    yum repolist  #查看yum的repo列表

    Centos6.5使用光盤掛載鏡像配置yum源安裝mysql5.7教程

    Centos6.5使用光盤掛載鏡像配置yum源安裝mysql5.7教程

二、本地yum源安裝相應(yīng)軟件包和數(shù)據(jù)庫

    1、需要提前安裝依賴的安裝包:libaio ,perl,numactl

    yum -y install libaio

    Centos6.5使用光盤掛載鏡像配置yum源安裝mysql5.7教程

    

    yum -y install perl

    Centos6.5使用光盤掛載鏡像配置yum源安裝mysql5.7教程

    

    yum -y install numactl

    Centos6.5使用光盤掛載鏡像配置yum源安裝mysql5.7教程

    2、搜索是否存在mysql文件

    rpm -qa|grep mysql   #查詢mysql文件

    rpm -e mysql-libs-5.1.71.-1.el6.x86_64 --nodeps  #強(qiáng)力刪除模式

    Centos6.5使用光盤掛載鏡像配置yum源安裝mysql5.7教程

    3。上傳mysql5.7的rpm包到/home/tools/mysql路徑

    mkdir /home/tools/mysql   #創(chuàng)建/home/tools/mysql文件夾

    cd /home/tools/mysql    #切換到/home/tools/mysql文件夾

    Centos6.5使用光盤掛載鏡像配置yum源安裝mysql5.7教程

    4.下載mysql5.7.13rpm包

    下載地址:http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.13-1.el6.x86_64.rpm-bundle.tar

     上傳mysql5.7.13rpm包到/home/tools/mysql文件夾中

    Centos6.5使用光盤掛載鏡像配置yum源安裝mysql5.7教程

    tar -xvf mysql-5.7.13-1.el6.x86_64.rpm-bundle.tar

    Centos6.5使用光盤掛載鏡像配置yum源安裝mysql5.7教程

    5.安裝mysql文件;

    rpm -ivh mysql-community-common-5.7.13-1.el6.x86_64.rpm

    rpm -ivh mysql-community-libs-5.7.13-1.el6.x86_64.rpm

    rpm -ivh mysql-community-client-5.7.13-1.el6.x86_64.rpm

    rpm -ivh mysql-community-server-5.7.13-1.el6.x86_64.rpm

    Centos6.5使用光盤掛載鏡像配置yum源安裝mysql5.7教程

    6.啟動(dòng)mysql服務(wù)

    cd /usr/bin    

    mysqld --initialize --user=mysql #初始化數(shù)據(jù)庫

    service mysqld start     #重啟數(shù)據(jù)庫

    Centos6.5使用光盤掛載鏡像配置yum源安裝mysql5.7教程

    Centos6.5使用光盤掛載鏡像配置yum源安裝mysql5.7教程 

    7.查看mysql默認(rèn)密碼

    grep "root@localhost"/var/log/mysqld.log 查看數(shù)據(jù)庫默認(rèn)密碼

    Centos6.5使用光盤掛載鏡像配置yum源安裝mysql5.7教程

三、登錄數(shù)據(jù)庫,設(shè)置初始密碼等

    1.登陸數(shù)據(jù):    

    mysql -uroot -p

    Centos6.5使用光盤掛載鏡像配置yum源安裝mysql5.7教程

    2.更改數(shù)據(jù)庫登陸密碼:

    mysql>alter user 'root'@'localhost' identified by 'passw0rd';

    Centos6.5使用光盤掛載鏡像配置yum源安裝mysql5.7教程

    3.允許遠(yuǎn)程連接

    mysql> use mysql;

    mysql> update user set host='%'where host='localhost' and user='root';

    mysql> flush privileges;

    Centos6.5使用光盤掛載鏡像配置yum源安裝mysql5.7教程

四、卸載光驅(qū)

    umonut /media/

    Centos6.5使用光盤掛載鏡像配置yum源安裝mysql5.7教程

五、驗(yàn)證數(shù)據(jù)庫

    service mysqld stop

    service mysqld start

    mysql -uroot -ppassw0rd

    Centos6.5使用光盤掛載鏡像配置yum源安裝mysql5.7教程

看完以上關(guān)于Centos6.5使用光盤掛載鏡像配置yum源安裝mysql5.7教程,很多讀者朋友肯定多少有一定的了解,如需獲取更多的行業(yè)知識(shí)信息 ,可以持續(xù)關(guān)注我們的行業(yè)資訊欄目的。

標(biāo)題名稱:Centos6.5使用光盤掛載鏡像配置yum源安裝mysql5.7教程
標(biāo)題路徑:http://muchs.cn/article34/ijsdpe.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供手機(jī)網(wǎng)站建設(shè)、網(wǎng)站維護(hù)、商城網(wǎng)站移動(dòng)網(wǎng)站建設(shè)、網(wǎng)站內(nèi)鏈標(biāo)簽優(yōu)化

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

手機(jī)網(wǎng)站建設(shè)