迷失北京

          BlogJava 聯系 聚合 管理
            60 Posts :: 0 Stories :: 13 Comments :: 0 Trackbacks

                因為是新手所以采用簡單的yum命令安裝:

          做到這一步是完全沒有問題的,但是更改密碼的時候 就出現問題了。因為安裝mysql的時候默認的root是沒有密密的,這也無所謂了,但是修改root用戶密碼的時候就出現:

          (參考別人的:http://blog.sina.com.cn/s/blog_6fd605b50100q5es.html)

          解決辦法:
          修改mysql登錄設置
          vi /etc/my.cnf
          在[mysqld]段中加入  skip-grant-tables
          保存之后重啟mysql服務
          service mysqld restart
          或者直接service mysqld stop
          mysqld_safe  skip-grant-tables 效果一樣。
          重啟mysql服務之后修改mysql密碼
          [root@localhost Anylinux]# mysql
          Welcome to the MySQL monitor. Commands end with ; or \g.
          Your MySQL connection id is 3 to server version: 3.23.56

          Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

          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> UPDATE user SET Password = password ( 'anylinux' ) WHERE User = 'root' ;
          Query OK, 0 rows affected (0.00 sec)
          Rows matched: 2 Changed: 0 Warnings: 0

          mysql> flush privileges ;
          Query OK, 0 rows affected (0.01 sec)

          mysql> quit
          Bye
          然后還原my.cnf就行了!!!
          posted on 2011-05-09 20:39 王康 閱讀(132) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 长垣县| 辰溪县| 商河县| 广州市| 南城县| 西乌珠穆沁旗| 达州市| 岚皋县| 汤阴县| 临城县| 呼和浩特市| 牙克石市| 汶川县| 南充市| 永昌县| 宜君县| 习水县| 桐梓县| 上蔡县| 北海市| 枝江市| 盖州市| 铁力市| 西乌珠穆沁旗| 垫江县| 呼玛县| 甘德县| 芦山县| 桓台县| 和硕县| 民县| 阳城县| 名山县| 循化| 金秀| 荣成市| 棋牌| 襄樊市| 锦屏县| 岐山县| 紫云|