Jafe Lee

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            49 隨筆 :: 0 文章 :: 24 評論 :: 0 Trackbacks
          1、直接apt-get 安裝:
          apt-get?install?mysql-server-5.0

          2、安裝啟動后出現錯誤信息:(中文)
          *?Stopping?MySQL?database?server?mysqld?[?OK?]
          安裝mysql?時出現下列錯誤,請教高手!
          *?Starting?MySQL?database?server?mysqld?[fail]
          invoke
          -rc.d:?initscript?mysql,?action?"start"?failed.
          dpkg:處理?mysql
          -server-5.0?(--configure)時出錯:
          子進程?post-installation?script?返回了錯誤號?1
          dpkg:依賴關系問題使得?mysql
          -server?的配置工作不能繼續:
          mysql
          -server?依賴于?mysql-server-5.0;然而:
          軟件包?mysql
          -server-5.0?還沒有被配置。
          dpkg:處理?mysql
          -server?(--configure)時出錯:
          依賴關系問題?-?仍未被配置
          Processing?triggers?
          for?libc6?
          ldconfig?deferred?processing?now?taking?place
          在處理時有錯誤發生:
          mysql
          -server-5.0
          mysql
          -server
          E:?Sub
          -process?/usr/bin/dpkg?returned?an?error?code?(1)

          英文錯誤信息是:
          invoke-rc.d:?initscript?apparmor,?action?"force-reload"?failed.
          *?Starting?MySQL?database?server?mysqld
          fail
          !
          invoke
          -rc.d:?initscript?mysql,?action?"start"?failed.
          dpkg:?error?processing?mysql
          -server-5.0?(--configure):
          subprocess?post
          -installation?script?returned?error?exit?status?1
          dpkg:?dependency?problems?prevent?configuration?of?mysql
          -server:
          mysql
          -server?depends?on?mysql-server-5.0;?however:
          Package?mysql
          -server-5.0?is?not?configured?yet.
          dpkg:?error?processing?mysql
          -server?(--configure):
          dependency?problems?
          -?leaving?unconfigured
          Errors?were?encountered?
          while?processing:
          mysql
          -server-5.0
          mysql
          -server
          E:?Sub
          -process?/usr/bin/dpkg?returned?an?error?code?(1)
          出現錯誤的原因是我修改了ubuntu的默認網絡設置(/etc/network/interfaces ),刪除了ubuntu的loopback接口,我的解決方法如下:
          ubuntu原來默認設置:
          auto?lo
          iface?lo?inet?loopback
          被我修改成靜態ip:
          auto?eth0
          iface?eth0?inet?static
          address?
          10.100.24.31
          netmask?
          255.255.255.0
          gateway?
          10.100.24.254
          將上面兩部分合起來就可以增加一個Loopback接口
          auto?eth0
          iface?eth0?inet?static
          address?
          10.100.24.31
          netmask?
          255.255.255.0
          gateway?
          10.100.24.254

          auto?lo
          iface?lo?inet?loopback?
          重啟系統,這時再安裝mysql-server就ok了~

          3、允許其他機器連接、訪問到數據庫:
          修改文件 /etc/mysql/my.cnf,將
          bind-address=127.0.0.1
          改為
          bind-address=0.0.0.0
          這樣將允許所有ip訪問數據庫

          參考資料:http://forum.ubuntu.org.cn/viewtopic.php?p=757703
          ?http://blog.csdn.net/redvalley/archive/2008/04/27/2333702.aspx
          問題2也可以參考一下這里的方法,似乎更簡單,也不用改動network設置,不過不知可不可以,沒驗證過~
          posted on 2008-06-14 11:26 Jafe Lee 閱讀(2201) 評論(0)  編輯  收藏 所屬分類: Database
          主站蜘蛛池模板: 泽普县| 东兴市| 凤山市| 夏河县| 东乡县| 唐海县| 柏乡县| 肇州县| 铜陵市| 简阳市| 大悟县| 山东省| 越西县| 洮南市| 曲麻莱县| 工布江达县| 蕉岭县| 吴桥县| 合川市| 静乐县| 益阳市| 晋州市| 温州市| 左贡县| 区。| 大安市| 竹溪县| 东方市| 城步| 牡丹江市| 隆安县| 青神县| 正宁县| 宜川县| 松原市| 会泽县| 东兴市| 林西县| 华蓥市| 余干县| 城步|