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 閱讀(2209) 評論(0)  編輯  收藏 所屬分類: Database
          主站蜘蛛池模板: 英德市| 水城县| 鸡泽县| 晴隆县| 西安市| 辽阳县| 张掖市| 栖霞市| 温州市| 惠水县| 乌鲁木齐市| 南宫市| 桐庐县| 桂平市| 宕昌县| 长海县| 蓝山县| 汉中市| 湘潭县| 宜川县| 禄劝| 左贡县| 隆安县| 繁昌县| 苏尼特左旗| 淮北市| 澎湖县| 琼海市| 秦皇岛市| 洮南市| 定西市| 泰和县| 大埔县| 巢湖市| 监利县| 松江区| 齐河县| 田林县| 万宁市| 谢通门县| 陵水|