迷失北京

          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就行了?。。?br />
          posted on 2011-05-09 20:39 王康 閱讀(130) 評論(0)  編輯  收藏

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


          網站導航:
           
          主站蜘蛛池模板: 乐业县| 宁远县| 陇西县| 东阿县| 富阳市| 龙胜| 宜章县| 香港 | 利辛县| 临沧市| 灯塔市| 潞西市| 新建县| 湛江市| 精河县| 永年县| 大宁县| 新丰县| 湘潭市| 新密市| 玉环县| 连云港市| 宁城县| 都安| 梧州市| 开原市| 革吉县| 海南省| 长泰县| 夏河县| 桂林市| 高安市| 寻甸| 商水县| 盐山县| 秭归县| 马关县| 巴林右旗| 涟源市| 杂多县| 乌拉特中旗|