迷失北京

          BlogJava 聯(lián)系 聚合 管理
            60 Posts :: 0 Stories :: 13 Comments :: 0 Trackbacks

                因?yàn)槭切率炙圆捎煤?jiǎn)單的yum命令安裝:

          做到這一步是完全沒(méi)有問(wèn)題的,但是更改密碼的時(shí)候 就出現(xiàn)問(wèn)題了。因?yàn)榘惭bmysql的時(shí)候默認(rèn)的root是沒(méi)有密密的,這也無(wú)所謂了,但是修改root用戶(hù)密碼的時(shí)候就出現(xiàn):

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

          解決辦法:
          修改mysql登錄設(shè)置
          vi /etc/my.cnf
          在[mysqld]段中加入  skip-grant-tables
          保存之后重啟mysql服務(wù)
          service mysqld restart
          或者直接service mysqld stop
          mysqld_safe  skip-grant-tables 效果一樣。
          重啟mysql服務(wù)之后修改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) 評(píng)論(0)  編輯  收藏

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


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 玉屏| 巨野县| 轮台县| 泰兴市| 华阴市| 个旧市| 沅陵县| 吉木乃县| 临城县| 龙川县| 高台县| 清水河县| 确山县| 临沂市| 诏安县| 双城市| 全椒县| 高碑店市| 梁平县| 益阳市| 辽宁省| 安新县| 永德县| 宿松县| 达拉特旗| 墨竹工卡县| 临夏市| 涟水县| 毕节市| 南和县| 胶州市| 洛南县| 河间市| 招远市| 江陵县| 凤庆县| 南投县| 巴里| 正宁县| 芷江| 周至县|