ubuntu 安裝 mysql 報錯

2021-06-18 22:48:04 字數 1802 閱讀 4614

gcc atomic builtins

110805 17:30:19 innodb: compressed tables use zlib 1.2.3

110805 17:30:19 innodb: initializing buffer pool, size = 256.0m

110805 17:30:19 innodb: completed initialization of buffer pool

innodb: error: log file /usr/local/mysql5.5/data/ib_logfile0 is of different size 0 5242880 bytes

innodb: than specified in the .cnf file 0 67108864 bytes!

110805 17:30:19 [error] plugin 'innodb' init function returned error.

110805 17:30:19 [error] plugin 'innodb' registration as a storage engine failed.

110805 17:30:19 [error] unknown/unsupported storage engine: innodb

110805 17:30:19 [error] aborting

110805 17:30:19 [note] /usr/local/mysql5.5/bin/mysqld: shutdown complete

看到上面紅色字型,顯示錯誤是出在日誌檔案大小上,於是檢視mysql的配置檔案/etc/my.cnf

# uncomment the following if you are using innodb tables

innodb_data_home_dir = /usr/local/mysql5.5/data

innodb_data_file_path = ibdata1:10m:autoextend

innodb_log_group_home_dir = /usr/local/mysql5.5/data

# you can set .._buffer_pool_size up to 50 - 80 %

# of ram but beware of setting memory usage too high

innodb_buffer_pool_size = 256m

innodb_additional_mem_pool_size = 20m

# set .._log_file_size to 25 % of buffer pool size

innodb_log_file_size = 64m

innodb_log_buffer_size = 8m

innodb_flush_log_at_trx_commit = 1

innodb_lock_wait_timeout = 50

配置檔案中指定了innodb_log_file_size=64m,在看看我的資料庫目錄下,日誌檔案大小是不是64m,如下圖,發現問題了,日誌檔案是5242880是5m

找到問題了,解決辦法可以更改配置檔案,也可以刪除現在這個日誌,再啟動mysql這樣它會重新生成這兩個日誌檔案。

怎麼會出現這個問題呢?

一般來說,是由於,在my.cnf中關於innodb的一些配置是被注釋的,在沒有更改的情況下,系統就使用了預設值,這樣,當你把關於innodb的配置選項注釋去掉的時候,就會出現這個報錯!

Ubuntu安裝wine報錯

解決辦法 刪除 etc apt sources.list.d目錄下,對應的錯誤倉庫檔案即可。sudo add apt repository ppa ubuntu wine ppa 新增source源 再執行sudo apt get update就不會有報錯了。我們繼續安裝,執行 sudo apt g...

Mysql 安裝報錯

本人經過驗證此方法是行的通的。呵呵 access denied for user root localhost using password yes 方法1 第一步 開啟開始裡mysql的mysql command line client 輸入你的密碼 就是安裝時設的那個 第二步 在mysql 後輸...

ubuntu安裝scrapy後報錯

安裝scrapy的方法 其中,畫重點 sudo apt get install python dev sudo apt get install libevent dev 安裝後執行scrapy startproject projectnanme或scrapy h,報錯 traceback most ...