迷失北京

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

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

          做到這一步是完全沒有問題的,但是更改密碼的時候 就出現(xiàn)問題了。因為安裝mysql的時候默認(rèn)的root是沒有密密的,這也無所謂了,但是修改root用戶密碼的時候就出現(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就行了?。。?br />
          posted on 2011-05-09 20:39 王康 閱讀(130) 評論(0)  編輯  收藏

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


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 信丰县| 视频| 贵阳市| 沁水县| 鹤岗市| 高雄县| 鲁甸县| 双城市| 清流县| 内江市| 民乐县| 调兵山市| 互助| 济南市| 巩义市| 宝兴县| 宜良县| 高雄县| 三穗县| 昂仁县| 南川市| 大余县| 东台市| 龙江县| 金华市| 天气| 南部县| 隆安县| 太和县| 车险| 郓城县| 依安县| 威远县| 柏乡县| 都匀市| 武功县| 西丰县| 永新县| 大悟县| 德阳市| 弥渡县|