<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    有機(jī)肥

    綠色

    centos7 mysql數(shù)據(jù)庫(kù)安裝和配置(轉(zhuǎn)http://www.cnblogs.com/starof/p/4680083.html)

    一、系統(tǒng)環(huán)境

    yum update升級(jí)以后的系統(tǒng)版本為

    [root@yl-web yl]# cat /etc/redhat-release  CentOS Linux release 7.1.1503 (Core) 

    二、mysql安裝

    # wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm # rpm -ivh mysql-community-release-el7-5.noarch.rpm # yum install mysql-community-server

    安裝成功后重啟mysql服務(wù)。

    # service mysqld restart

    初次安裝mysql,root賬戶(hù)沒(méi)有密碼。

    復(fù)制代碼
    [root@yl-web yl]# mysql -u root  Welcome to the MySQL monitor.  Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.6.26 MySQL Community Server (GPL)  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> show databases; +--------------------+ | Database           | +--------------------+ | information_schema | | mysql              | | performance_schema | | test               | +--------------------+ 4 rows in set (0.01 sec)  mysql> 
    復(fù)制代碼

    設(shè)置密碼

    mysql> set password for 'root'@'localhost' =password('password'); Query OK, 0 rows affected (0.00 sec)  mysql> 

    不需要重啟數(shù)據(jù)庫(kù)即可生效。

    三、配置mysql

    1、編碼

    mysql配置文件為/etc/my.cnf

    最后加上編碼配置

    [mysql] default-character-set =utf8

    這里的字符編碼必須和/usr/share/mysql/charsets/Index.xml中一致。

    2、遠(yuǎn)程連接設(shè)置

    把在所有數(shù)據(jù)庫(kù)的所有表的所有權(quán)限賦值給位于所有IP地址的root用戶(hù)。

    mysql> grant all privileges on *.* to root@'%'identified by 'password';

    如果是新用戶(hù)而不是root,則要先新建用戶(hù)

    mysql>create user 'username'@'%' identified by 'password';  

    此時(shí)就可以進(jìn)行遠(yuǎn)程連接了。

    posted on 2017-03-01 10:20 有機(jī)肥 閱讀(163) 評(píng)論(0)  編輯  收藏


    只有注冊(cè)用戶(hù)登錄后才能發(fā)表評(píng)論。


    網(wǎng)站導(dǎo)航:
     
    <2017年3月>
    2627281234
    567891011
    12131415161718
    19202122232425
    2627282930311
    2345678

    導(dǎo)航

    統(tǒng)計(jì)

    常用鏈接

    留言簿

    隨筆檔案

    搜索

    最新評(píng)論

    閱讀排行榜

    評(píng)論排行榜

    主站蜘蛛池模板: 亚洲s码欧洲m码吹潮| 久久免费公开视频| 亚洲日韩乱码中文无码蜜桃臀| 内射无码专区久久亚洲| 毛片免费全部播放无码| 久久最新免费视频| 亚洲精品无码中文久久字幕| 亚洲精品国产啊女成拍色拍| 国产亚洲日韩在线三区| 免费播放春色aⅴ视频| 我们的2018在线观看免费高清| A片在线免费观看| 一级白嫩美女毛片免费| 春暖花开亚洲性无区一区二区| 亚洲va在线va天堂va手机| 久久国产精品亚洲一区二区| 亚洲无码黄色网址| 免费国产不卡午夜福在线| 好吊妞788免费视频播放| jjizz全部免费看片| 99re免费99re在线视频手机版| 国产一级a毛一级a看免费人娇| 日韩在线观看免费| 美女被爆羞羞网站在免费观看| 亚洲.国产.欧美一区二区三区| 亚洲av产在线精品亚洲第一站| 亚洲欧洲在线观看| 亚洲国产精品久久久久网站| 亚洲av中文无码乱人伦在线咪咕| 亚洲综合无码AV一区二区| 亚洲视频在线一区二区| 国产亚洲精久久久久久无码AV| 国产综合精品久久亚洲| 精品亚洲一区二区三区在线播放| 中文字幕中韩乱码亚洲大片 | 美女视频黄a视频全免费网站一区 美女视频黄a视频全免费网站色 | 亚洲成a人一区二区三区| 99re免费99re在线视频手机版| 99精品视频在线观看免费专区| 日本免费一区二区三区| 精品无码AV无码免费专区|