• <fieldset id="8imwq"><menu id="8imwq"></menu></fieldset>
  • <bdo id="8imwq"><input id="8imwq"></input></bdo>
    最新文章專題視頻專題問答1問答10問答100問答1000問答2000關鍵字專題1關鍵字專題50關鍵字專題500關鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關鍵字專題關鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
    問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
    當前位置: 首頁 - 科技 - 知識百科 - 正文

    centos6.5下mysql-community-server.5.7.18-1.el6安裝

    來源:懂視網 責編:小采 時間:2020-11-09 20:35:05
    文檔

    centos6.5下mysql-community-server.5.7.18-1.el6安裝

    centos6.5下mysql-community-server.5.7.18-1.el6安裝:使用下面的命令檢查是否安裝有MySQL Server [root@localhost etc]# rpm -qa | grep mysql // 這個命令就會查看該操作系統上是否已經安裝了mysql數據庫 有的話,我們就通過 rpm -e 命令 或者 rpm -e --nodeps 命令來卸載掉 [
    推薦度:
    導讀centos6.5下mysql-community-server.5.7.18-1.el6安裝:使用下面的命令檢查是否安裝有MySQL Server [root@localhost etc]# rpm -qa | grep mysql // 這個命令就會查看該操作系統上是否已經安裝了mysql數據庫 有的話,我們就通過 rpm -e 命令 或者 rpm -e --nodeps 命令來卸載掉 [

    使用下面的命令檢查是否安裝有MySQL Server

    [root@localhost etc]# rpm -qa | grep mysql // 這個命令就會查看該操作系統上是否已經安裝了mysql數據庫

       有的話,我們就通過 rpm -e 命令 或者 rpm -e --nodeps 命令來卸載掉

    [root@localhost ~]# rpm -e mysql  // 普通刪除模式
    [root@localhost ~]# rpm -e --nodeps mysql  // 強力刪除模式,如果使用上面命令刪除時,提示有依賴的其它文件,則用該命令可以對其進行強力刪除

       在刪除完以后我們可以通過 rpm -qa | grep mysql 命令來查看mysql是否已經卸載成功!!

    官網yum repository 下載安裝包

    [root@localhost ~]# wget http://dev.mysql.com/get/mysql57-community-release-el6-10.noarch.rpm
     --2017-04-24 18:53:49-- http://dev.mysql.com/get/mysql57-community-release-el6-10.noarch.rpm
    Resolving dev.mysql.com... 137.254.60.11
    Connecting to dev.mysql.com|137.254.60.11|:80... connected.
    HTTP request sent, awaiting response... 301 Moved Permanently
    Location: https://dev.mysql.com/get/mysql57-community-release-el6-10.noarch.rpm [following]
    --2017-04-24 18:53:49-- https://dev.mysql.com/get/mysql57-community-release-el6-10.noarch.rpm
    Connecting to dev.mysql.com|137.254.60.11|:443... connected.
    ERROR: certificate common name “www.mysql.com” doesn't match requested host name “dev.mysql.com”.
    To connect to dev.mysql.com insecurely, use ‘--no-check-certificate'

    本地安裝下載下來的rpm包

    [root@localhost ~]# yum localinstall mysql57-community-release-el6-10.noarch.rpm
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Setting up Local Package Process
    Examining mysql57-community-release-el6-10.noarch.rpm: mysql57-community-release-el6-10.noarch
    Marking mysql57-community-release-el6-10.noarch.rpm to be installed
    Loading mirror speeds from cached hostfile
     * base: mirrors.cn99.com
     * extras: mirrors.cn99.com
     * updates: mirrors.cn99.com
    Resolving Dependencies
    --> Running transaction check
    ---> Package mysql57-community-release.noarch 0:el6-10 will be installed
    --> Finished Dependency Resolution
    Dependencies Resolved
    ===============================================================================================================================================================================================
     Package Arch Version Repository Size
    ===============================================================================================================================================================================================
    Installing:
     mysql57-community-release noarch el6-10 /mysql57-community-release-el6-10.noarch 30 k
    Transaction Summary
    ===============================================================================================================================================================================================
    Install 1 Package(s)
    Total size: 30 k
    Installed size: 30 k
    Is this ok [y/N]: y
    Downloading Packages:
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
     Installing : mysql57-community-release-el6-10.noarch 1/1
     Verifying : mysql57-community-release-el6-10.noarch 1/1
    Installed:
     mysql57-community-release.noarch 0:el6-10 
    Complete!

      查看可用的安裝包 

    [root@localhost ~]# yum repolist enabled|grep mysql
    mysql-connectors-community MySQL Connectors Community 33
    mysql-tools-community MySQL Tools Community 47
    mysql57-community MySQL 5.7 Community Server 183

    安裝前裝gcc所有包,防止報錯[Errno -1]  Package does not match intended download

    [root@localhost yum.repos.d]# yum install gcc* 

    安裝mysql

    [root@localhost yum.repos.d]# yum install -y mysql-community-server 
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Loading mirror speeds from cached hostfile
     * base: mirrors.cn99.com
     * extras: mirrors.cn99.com
     * updates: mirrors.cn99.com
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package mysql-community-server.x86_64 0:5.7.18-1.el6 will be installed
    --> Processing Dependency: mysql-community-common(x86-64) = 5.7.18-1.el6 for package: mysql-community-server-5.7.18-1.el6.x86_64
    --> Processing Dependency: mysql-community-client(x86-64) >= 5.7.9 for package: mysql-community-server-5.7.18-1.el6.x86_64
    --> Running transaction check
    ---> Package mysql-community-client.x86_64 0:5.7.18-1.el6 will be installed
    --> Processing Dependency: mysql-community-libs(x86-64) >= 5.7.9 for package: mysql-community-client-5.7.18-1.el6.x86_64
    ---> Package mysql-community-common.x86_64 0:5.7.18-1.el6 will be installed
    --> Running transaction check
    ---> Package mysql-community-libs.x86_64 0:5.7.18-1.el6 will be obsoleting
    ---> Package mysql-libs.x86_64 0:5.1.71-1.el6 will be obsoleted
    --> Processing Dependency: libmysqlclient.so.16()(64bit) for package: 2:postfix-2.6.6-2.2.el6_1.x86_64
    --> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: 2:postfix-2.6.6-2.2.el6_1.x86_64
    --> Running transaction check
    ---> Package mysql-community-libs-compat.x86_64 0:5.7.18-1.el6 will be obsoleting
    ---> Package postfix.x86_64 2:2.6.6-2.2.el6_1 will be updated
    ---> Package postfix.x86_64 2:2.6.6-8.el6 will be an update
    --> Finished Dependency Resolution
    Dependencies Resolved
    =============================================================================================================================
     Package Arch Version Repository Size
    =============================================================================================================================
    Installing:
     mysql-community-libs x86_64 5.7.18-1.el6 mysql57-community 2.1 M
     replacing mysql-libs.x86_64 5.1.71-1.el6
     mysql-community-libs-compat x86_64 5.7.18-1.el6 mysql57-community 1.6 M
     replacing mysql-libs.x86_64 5.1.71-1.el6
     mysql-community-server x86_64 5.7.18-1.el6 mysql57-community 152 M
    Installing for dependencies:
     mysql-community-client x86_64 5.7.18-1.el6 mysql57-community 23 M
     mysql-community-common x86_64 5.7.18-1.el6 mysql57-community 328 k
    Updating for dependencies:
     postfix x86_64 2:2.6.6-8.el6 base 2.0 M
    Transaction Summary
    =============================================================================================================================
    Install 5 Package(s)
    Upgrade 1 Package(s)
    Total size: 180 M
    Total download size: 152 M
    Downloading Packages:
    mysql-community-server-5.7.18-1.el6.x86_64.rpm | 152 MB 01:41 
    warning: rpmts_HdrFromFdno: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
    Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
    Importing GPG key 0x5072E1F5:
     Userid : MySQL Release Engineering <mysql-build@oss.oracle.com>
     Package: mysql57-community-release-el6-10.noarch (@/mysql57-community-release-el6-10.noarch)
     From : /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
     Installing : mysql-community-common-5.7.18-1.el6.x86_64 1/8
     Installing : mysql-community-libs-5.7.18-1.el6.x86_64 2/8
     Installing : mysql-community-libs-compat-5.7.18-1.el6.x86_64 3/8
     Installing : mysql-community-client-5.7.18-1.el6.x86_64 4/8
     Installing : mysql-community-server-5.7.18-1.el6.x86_64 5/8
     Updating : 2:postfix-2.6.6-8.el6.x86_64 6/8
     Cleanup : 2:postfix-2.6.6-2.2.el6_1.x86_64 7/8
     Erasing : mysql-libs-5.1.71-1.el6.x86_64 8/8
     Verifying : 2:postfix-2.6.6-8.el6.x86_64 1/8
     Verifying : mysql-community-libs-compat-5.7.18-1.el6.x86_64 2/8
     Verifying : mysql-community-server-5.7.18-1.el6.x86_64 3/8
     Verifying : mysql-community-libs-5.7.18-1.el6.x86_64 4/8
     Verifying : mysql-community-common-5.7.18-1.el6.x86_64 5/8
     Verifying : mysql-community-client-5.7.18-1.el6.x86_64 6/8
     Verifying : 2:postfix-2.6.6-2.2.el6_1.x86_64 7/8
     Verifying : mysql-libs-5.1.71-1.el6.x86_64 8/8
    Installed:
     mysql-community-libs.x86_64 0:5.7.18-1.el6 mysql-community-libs-compat.x86_64 0:5.7.18-1.el6 
     mysql-community-server.x86_64 0:5.7.18-1.el6 
    Dependency Installed:
     mysql-community-client.x86_64 0:5.7.18-1.el6 mysql-community-common.x86_64 0:5.7.18-1.el6 
    Dependency Updated:
     postfix.x86_64 2:2.6.6-8.el6 
    Replaced:
     mysql-libs.x86_64 0:5.1.71-1.el6 
    Complete!

    啟動mysql

    [root@localhost yum.repos.d]# service mysqld start  
    Initializing MySQL database: [ OK ]
    Installing validate password plugin: [ OK ]
    Starting mysqld: 

      進入mysql安全模式

    [root@localhost yum.repos.d]# killall -TERM mysqld
    [root@localhost yum.repos.d]# mysqld_safe --skip-grant-tables &
    [1] 40422
    [root@localhost yum.repos.d]# 2017-04-25T07:45:39.222061Z mysqld_safe Logging to '/var/log/mysqld.log'.
    2017-04-25T07:45:39.246117Z mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    mysql -uroot -p
    Enter password:
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 3
    Server version: 5.7.18 MySQL Community Server (GPL)
    Copyright (c) 2000, 2017, 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> use mysql
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    Database changed
    mysql> select * from users;
    ERROR 1146 (42S02): Table 'mysql.users' doesn't exist
    mysql> select * from user;
    mysql> update user set authentication_string=PASSWORD('mysql') where user='root';
    Query OK, 1 row affected, 1 warning (0.00 sec)
    Rows matched: 1 Changed: 1 Warnings: 1
    mysql> quit
    Bye
    [2]+ Exit 1 mysqld_safe --skip-grant-tables
      
    [root@localhost yum.repos.d]# service mysqld start
    Starting mysqld: [ OK ]
    [root@localhost yum.repos.d]# mysql -uroot -p
    Enter password:
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 5
    Server version: 5.7.18 MySQL Community Server (GPL)
    Copyright (c) 2000, 2017, 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 -h主機地址 -u用戶名 -p用戶密碼

    1、例1:連接到本機上的MYSQL

       找到mysql的安裝目錄,一般可以直接鍵入命令mysql -uroot -p,回車后提示你輸密碼,如果剛安裝好MYSQL,超級用戶root是沒有密碼的,故直接回車即可進入到MYSQL中

    了,MYSQL的提示符是:mysql>

    2、連接到遠程主機上的MYSQL

       假設遠程主機的IP為:10.0.0.1,用戶名為root,密碼為123。則鍵入以下命令:

    mysql -h10.0.0.1 -uroot -p123

      (注:u與root可以不用加空格,其它也一樣)

    配置防火墻

    防火墻的3306端口默認沒有開啟,若要遠程訪問,需要開啟這個端口

    打開/etc/sysconfig/iptables

    在“-A INPUT –m state --state NEW –m tcp –p tcp –dport 22 –j ACCEPT”,下添加:

    -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT

    然后保存,并關閉該文件,在終端內運行下面的命令,刷新防火墻配置:

    service iptables restart OK,一切配置完畢,你可以訪問你的MySQL了~

    注意:增加的開放3306端口的語句一定要在icmp-host-prohibited之前

    mysql -uroot -p
    Enter password: 
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 3
    Server version: 5.7.18 MySQL Community Server (GPL)

    Copyright (c) 2000, 2017, 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.

    以上所述是小編給大家介紹的centos 6.5下 mysql-community-server. 5.7.18-1.el6安裝,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對腳本之家網站的支持!

    您可能感興趣的文章:

  • mysql 5.7.18 MSI安裝圖文教程
  • mysql 5.7.18 Archive壓縮版安裝教程
  • windows系統mysql5.7.18安裝圖文教程
  • mysql 5.7.18 zip版安裝配置方法圖文教程(win7)
  • centos6.4下mysql5.7.18安裝配置方法圖文教程
  • Windows下mysql5.7.18安裝配置教程
  • mysql 5.7.18 winx64安裝配置方法圖文教程
  • MySQL 5.7.18 免安裝版配置教程
  • MySQL5.7.18下載和安裝過程圖文詳解
  • mysql 5.7.18 Installer安裝下載圖文教程
  • 聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

    文檔

    centos6.5下mysql-community-server.5.7.18-1.el6安裝

    centos6.5下mysql-community-server.5.7.18-1.el6安裝:使用下面的命令檢查是否安裝有MySQL Server [root@localhost etc]# rpm -qa | grep mysql // 這個命令就會查看該操作系統上是否已經安裝了mysql數據庫 有的話,我們就通過 rpm -e 命令 或者 rpm -e --nodeps 命令來卸載掉 [
    推薦度:
    標簽: 安裝 安裝包 mysql
    • 熱門焦點

    最新推薦

    猜你喜歡

    熱門推薦

    專題
    Top
    主站蜘蛛池模板: 日韩精品无码Av一区二区| 国产精品美女网站| 久久国产乱子伦精品免费强| 久久精品无码一区二区三区免费| 精品人伦一区二区三区潘金莲| 精品国产乱码久久久久久浪潮| 国产精品久久99| 无码精品久久久久久人妻中字| 精品国产日韩亚洲一区| 你懂的国产精品| 久久精品国产亚洲AV嫖农村妇女| 精品人妻码一区二区三区| 日韩精品无码Av一区二区| 999国产精品视频| 99精品在线观看| 久久精品国产亚洲av高清漫画| 亚州日韩精品专区久久久| 国产精品狼人久久久久影院| 国产精品久久久久影院嫩草| 亚洲Av无码精品色午夜 | 精品福利一区二区三区免费视频 | 久久这里只有精品18| 亚洲国产成人精品无码久久久久久综合 | 99久re热视频这里只有精品6| 精品亚洲成a人片在线观看少妇| 亚洲七七久久精品中文国产| 久久99精品久久久久久9蜜桃| 国产成人精品综合在线观看| 久久综合九色综合精品| 九九热在线视频观看这里只有精品| 国产日韩精品欧美一区喷水| 老司机午夜精品视频资源| 亚洲精品制服丝袜四区| 欲帝精品福利视频导航| 四虎永久在线精品国产馆V视影院| 国产精品日韩欧美在线第3页| 91人妻人人澡人人爽人人精品 | …久久精品99久久香蕉国产| 精品无人区一区二区三区| 亚洲国产精品特色大片观看完整版| 亚洲国产综合精品中文字幕|