亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb

首頁 > 數據庫 > MySQL > 正文

centos 6.5下 mysql-community-server. 5.7.18-1.el6安裝

2024-07-24 13:13:09
字體:
來源:轉載
供稿:網友

使用下面的命令檢查是否安裝有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.rpmResolving dev.mysql.com... 137.254.60.11Connecting to dev.mysql.com|137.254.60.11|:80... connected.HTTP request sent, awaiting response... 301 Moved PermanentlyLocation: 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.rpmConnecting 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.rpmLoaded plugins: fastestmirror, refresh-packagekit, securitySetting up Local Package ProcessExamining mysql57-community-release-el6-10.noarch.rpm: mysql57-community-release-el6-10.noarchMarking mysql57-community-release-el6-10.noarch.rpm to be installedLoading mirror speeds from cached hostfile * base: mirrors.cn99.com * extras: mirrors.cn99.com * updates: mirrors.cn99.comResolving Dependencies--> Running transaction check---> Package mysql57-community-release.noarch 0:el6-10 will be installed--> Finished Dependency ResolutionDependencies Resolved=============================================================================================================================================================================================== Package                      Arch              Version              Repository                             Size===============================================================================================================================================================================================Installing: mysql57-community-release             noarch             el6-10               /mysql57-community-release-el6-10.noarch              30 kTransaction Summary===============================================================================================================================================================================================Install    1 Package(s)Total size: 30 kInstalled size: 30 kIs this ok [y/N]: yDownloading Packages:Running rpm_check_debugRunning Transaction TestTransaction Test SucceededRunning Transaction Installing : mysql57-community-release-el6-10.noarch                                   1/1 Verifying : mysql57-community-release-el6-10.noarch                                     1/1Installed: mysql57-community-release.noarch 0:el6-10                          Complete!

  查看可用的安裝包 

[root@localhost ~]# yum repolist enabled|grep mysqlmysql-connectors-community      MySQL Connectors Community       33mysql-tools-community        MySQL Tools Community          47mysql57-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, securityLoading mirror speeds from cached hostfile * base: mirrors.cn99.com * extras: mirrors.cn99.com * updates: mirrors.cn99.comSetting up Install ProcessResolving 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 ResolutionDependencies 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 MInstalling 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 kUpdating for dependencies: postfix                 x86_64       2:2.6.6-8.el6        base             2.0 MTransaction Summary=============================================================================================================================Install    5 Package(s)Upgrade    1 Package(s)Total size: 180 MTotal download size: 152 MDownloading 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: NOKEYRetrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysqlImporting 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-mysqlRunning rpm_check_debugRunning Transaction TestTransaction Test SucceededRunning 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/8Installed: 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/mysqlmysql -uroot -pEnter password:Welcome to the MySQL monitor. Commands end with ; or /g.Your MySQL connection id is 3Server 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 itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '/h' for help. Type '/c' to clear the current input statement. mysql> use mysqlReading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with -ADatabase changedmysql> select * from users;ERROR 1146 (42S02): Table 'mysql.users' doesn't existmysql> 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: 1mysql> quitBye[2]+ Exit 1         mysqld_safe --skip-grant-tables  [root@localhost yum.repos.d]# service mysqld startStarting mysqld:                      [ OK ][root@localhost yum.repos.d]# mysql -uroot -pEnter password:Welcome to the MySQL monitor. Commands end with ; or /g.Your MySQL connection id is 5Server 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 itsaffiliates. Other names may be trademarks of their respectiveowners.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 -pEnter password: Welcome to the MySQL monitor. Commands end with ; or /g.Your MySQL connection id is 3Server 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安裝,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對VeVb武林網網站的支持!


注:相關教程知識閱讀請移步到MYSQL教程頻道。
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb
日韩欧美中文第一页| 超碰91人人草人人干| 91久久国产婷婷一区二区| 中文字幕日韩欧美| 国产精品亚洲精品| 91成人福利在线| 欧美日韩亚洲一区二区| 精品国产一区二区三区四区在线观看| 精品国产31久久久久久| 成人精品在线视频| 国产日韩欧美91| 少妇av一区二区三区| 日韩免费黄色av| 亚洲国产精品yw在线观看| 91国内产香蕉| 亚洲美女在线观看| 国产日本欧美一区二区三区在线| 亚洲一区二区三区乱码aⅴ| 91亚洲精品一区| 91免费看片网站| 7777精品久久久久久| 26uuu亚洲国产精品| 欧美一级视频在线观看| 午夜精品久久久久久久99热浪潮| 久久久久久成人| 91精品91久久久久久| 欧美激情a∨在线视频播放| 亚洲加勒比久久88色综合| 不卡av电影在线观看| 亚洲欧美日韩在线高清直播| 欧美电影免费观看高清| 毛片精品免费在线观看| 日韩欧美国产免费播放| 国产精品777| 狠狠色狠狠色综合日日小说| 日韩欧美大尺度| 亚洲欧洲高清在线| 日韩欧美一区二区三区| 亚洲成人网在线| 久久久久国产精品免费网站| 国产日韩欧美视频| 色www亚洲国产张柏芝| 色中色综合影院手机版在线观看| 亚洲成人免费在线视频| 日本久久久久久久| 日韩不卡中文字幕| 亚洲国产高潮在线观看| 国产成人一区二区在线| 久久亚洲国产精品成人av秋霞| 国模私拍一区二区三区| 欧美一二三视频| 久久精品国产欧美亚洲人人爽| 国产美女扒开尿口久久久| 国产不卡av在线| 日本电影亚洲天堂| 91精品在线一区| 亚洲精品一区二区三区不| 亚洲影院污污.| 亚洲欧美另类自拍| 91精品视频专区| 日韩精品在线视频| 亚洲欧美精品在线| 亚洲福利在线看| 国产精品极品美女在线观看免费| 久久久在线视频| 91欧美精品成人综合在线观看| 久久久久久国产免费| 97精品一区二区视频在线观看| 91最新国产视频| 欧美日韩国产综合视频在线观看中文| 俺去亚洲欧洲欧美日韩| 欧美激情亚洲一区| 国产成人小视频在线观看| 欧美日韩第一视频| 久久免费高清视频| 国产精品欧美日韩| 久久99国产精品自在自在app| 久久国产精品99国产精| 九九久久久久久久久激情| 91精品综合久久久久久五月天| 色av中文字幕一区| 成人激情春色网| 国产国语videosex另类| 日韩av第一页| 人人做人人澡人人爽欧美| 最近2019免费中文字幕视频三| 黑人狂躁日本妞一区二区三区| 国产精品美女免费视频| 亚洲国产天堂久久综合| 亚洲无亚洲人成网站77777| 国产激情久久久久| 国产日韩在线免费| 日韩av不卡在线| 亚洲人线精品午夜| 97在线观看免费| 2019中文字幕免费视频| 51精品国产黑色丝袜高跟鞋| 亚洲国产精品va在线观看黑人| 亚洲深夜福利网站| 国产精品综合不卡av| 精品久久久久久亚洲国产300| 亚洲成av人影院在线观看| 国产一区二区三区18| 欧美性猛交xxxx免费看| 亚州国产精品久久久| 91av在线不卡| 欧美精品18videos性欧| 97av在线视频| 精品国产91乱高清在线观看| 欧美日韩激情小视频| 日韩福利伦理影院免费| 久久久久久久久综合| 色视频www在线播放国产成人| 亚洲精品网站在线播放gif| 国产精品99蜜臀久久不卡二区| 成人激情视频在线观看| 97超级碰碰碰久久久| 欧美激情xxxx性bbbb| 欧美性极品xxxx做受| 国产精品网站视频| 亚洲第一精品夜夜躁人人爽| 欧美网站在线观看| 久久中文字幕视频| 久99九色视频在线观看| 欧洲亚洲在线视频| 亚洲一级黄色片| 国产欧美va欧美va香蕉在线| 欧美日韩中文字幕综合视频| 欧美成人精品影院| 久久久国产精品免费| 久久久精品在线观看| 亚洲va欧美va国产综合剧情| 一区二区成人精品| 国产精品色婷婷视频| 国产精品影片在线观看| 992tv在线成人免费观看| 国产精品扒开腿爽爽爽视频| 欧美日韩国产麻豆| 国产精品久久久久av| 欧美日韩日本国产| 亚洲人高潮女人毛茸茸| 日韩精品高清在线| 欧美极品在线播放| 亚洲欧洲日产国产网站| 欧美乱大交做爰xxxⅹ性3| 国产精品吹潮在线观看| 欧美一区二区色| 日韩美女视频免费在线观看| 国产97在线亚洲| 久久久久久高潮国产精品视| xxx成人少妇69| 久久亚洲国产精品| 欧美大尺度电影在线观看| 色青青草原桃花久久综合| 国产欧美日韩最新| 欧美高清激情视频| 欧美激情国产高清| 色www亚洲国产张柏芝| 91精品国产高清自在线| 欧美激情啊啊啊| 日韩理论片久久| 久久视频精品在线| 国模精品一区二区三区色天香| 国产香蕉一区二区三区在线视频|