Innodb plugins 的安裝(三)
搞了好幾天,雖然只是裝了個比較老的版本,但是也算一個小的進步。
準備調整一下InnoDB的引數:
# Uncomment the following if you are using InnoDB tables
innodb_data_home_dir = /opt/mysqldata/data/
innodb_data_file_path = ibdata1:100M;ibdata2:100M:autoextend
innodb_log_group_home_dir = /opt/mysqldata/data/
innodb_log_files_in_group = 3
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 32M
innodb_additional_mem_pool_size = 4M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 16M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50
innodb_data_home_dir = /opt/mysqldata/data/
innodb_data_file_path = ibdata1:100M;ibdata2:100M:autoextend
innodb_log_group_home_dir = /opt/mysqldata/data/
innodb_log_files_in_group = 3
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 32M
innodb_additional_mem_pool_size = 4M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 16M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50
啟動時報錯:
01225 17:41:01 mysqld_safe Starting mysqld daemon with databases from /opt/mysqldata/data
101225 17:41:01 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use InnoDB's own implementation
InnoDB: Error: data file /opt/mysqldata/data/ibdata1 is of a different size
InnoDB: 640 pages (rounded down to MB)
InnoDB: than specified in the .cnf file 6400 pages!
InnoDB: Could not open or create data files.
InnoDB: If you tried to add new data files, and it failed here,
InnoDB: you should now edit innodb_data_file_path in my.cnf back
InnoDB: to what it was, and remove the new ibdata files InnoDB created
InnoDB: in this failed attempt. InnoDB only wrote those files full of
InnoDB: zeros, but did not yet use them in any way. But be careful: do not
InnoDB: remove old data files which contain your precious data!
101225 17:41:01 [ERROR] Plugin 'InnoDB' init function returned error.
101225 17:41:01 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
101225 17:41:01 [Note] Event Scheduler: Loaded 0 events
101225 17:41:01 [Note] /opt/mysqldata/libexec/mysqld: ready for connections.
Version: '5.1.45-log' socket: '/opt/mysqldata/mysql.sock' port: 3306 Source distribution
101225 17:41:01 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use InnoDB's own implementation
InnoDB: Error: data file /opt/mysqldata/data/ibdata1 is of a different size
InnoDB: 640 pages (rounded down to MB)
InnoDB: than specified in the .cnf file 6400 pages!
InnoDB: Could not open or create data files.
InnoDB: If you tried to add new data files, and it failed here,
InnoDB: you should now edit innodb_data_file_path in my.cnf back
InnoDB: to what it was, and remove the new ibdata files InnoDB created
InnoDB: in this failed attempt. InnoDB only wrote those files full of
InnoDB: zeros, but did not yet use them in any way. But be careful: do not
InnoDB: remove old data files which contain your precious data!
101225 17:41:01 [ERROR] Plugin 'InnoDB' init function returned error.
101225 17:41:01 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
101225 17:41:01 [Note] Event Scheduler: Loaded 0 events
101225 17:41:01 [Note] /opt/mysqldata/libexec/mysqld: ready for connections.
Version: '5.1.45-log' socket: '/opt/mysqldata/mysql.sock' port: 3306 Source distribution
原因是我的引數檔案是cp support-files/my-small.cnf /etc/my.cnf,啟動後mysql自動建立表空間資料檔案和重做日誌檔案,修改引數後再次啟動就會這樣。
對於一個新裝的很好解決,把表空間資料檔案和重做日誌檔案刪除,然後啟動。
101225 17:42:09 mysqld_safe Starting mysqld daemon with databases from /opt/mysqldata/data
101225 17:42:09 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use InnoDB's own implementation
InnoDB: The first specified data file /opt/mysqldata/data/ibdata1 did not exist:
InnoDB: a new database to be created!
101225 17:42:09 InnoDB: Setting file /opt/mysqldata/data/ibdata1 size to 100 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Progress in MB: 100
101225 17:42:14 InnoDB: Data file /opt/mysqldata/data/ibdata2 did not exist: new to be created
101225 17:42:14 InnoDB: Setting file /opt/mysqldata/data/ibdata2 size to 100 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Progress in MB: 100
101225 17:42:18 InnoDB: Log file /opt/mysqldata/data/ib_logfile0 did not exist: new to be created
InnoDB: Setting log file /opt/mysqldata/data/ib_logfile0 size to 16 MB
InnoDB: Database physically writes the file full: wait...
101225 17:42:19 InnoDB: Log file /opt/mysqldata/data/ib_logfile1 did not exist: new to be created
InnoDB: Setting log file /opt/mysqldata/data/ib_logfile1 size to 16 MB
InnoDB: Database physically writes the file full: wait...
101225 17:42:20 InnoDB: Log file /opt/mysqldata/data/ib_logfile2 did not exist: new to be created
InnoDB: Setting log file /opt/mysqldata/data/ib_logfile2 size to 16 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
101225 17:42:23 InnoDB Plugin 1.0.6 started; log sequence number 0
101225 17:42:23 [Note] Event Scheduler: Loaded 0 events
101225 17:42:23 [Note] /opt/mysqldata/libexec/mysqld: ready for connections.
Version: '5.1.45-log' socket: '/opt/mysqldata/mysql.sock' port: 3306 Source distributio
101225 17:42:09 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use InnoDB's own implementation
InnoDB: The first specified data file /opt/mysqldata/data/ibdata1 did not exist:
InnoDB: a new database to be created!
101225 17:42:09 InnoDB: Setting file /opt/mysqldata/data/ibdata1 size to 100 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Progress in MB: 100
101225 17:42:14 InnoDB: Data file /opt/mysqldata/data/ibdata2 did not exist: new to be created
101225 17:42:14 InnoDB: Setting file /opt/mysqldata/data/ibdata2 size to 100 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Progress in MB: 100
101225 17:42:18 InnoDB: Log file /opt/mysqldata/data/ib_logfile0 did not exist: new to be created
InnoDB: Setting log file /opt/mysqldata/data/ib_logfile0 size to 16 MB
InnoDB: Database physically writes the file full: wait...
101225 17:42:19 InnoDB: Log file /opt/mysqldata/data/ib_logfile1 did not exist: new to be created
InnoDB: Setting log file /opt/mysqldata/data/ib_logfile1 size to 16 MB
InnoDB: Database physically writes the file full: wait...
101225 17:42:20 InnoDB: Log file /opt/mysqldata/data/ib_logfile2 did not exist: new to be created
InnoDB: Setting log file /opt/mysqldata/data/ib_logfile2 size to 16 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
101225 17:42:23 InnoDB Plugin 1.0.6 started; log sequence number 0
101225 17:42:23 [Note] Event Scheduler: Loaded 0 events
101225 17:42:23 [Note] /opt/mysqldata/libexec/mysqld: ready for connections.
Version: '5.1.45-log' socket: '/opt/mysqldata/mysql.sock' port: 3306 Source distributio
如果是一個使用了的資料庫,就沒這麼簡單了,保留原有的資料檔案不變,再增加其他的;正常關閉資料庫後,刪除重做日誌檔案,當然最好有個全備份,並冷備份了相應的檔案。以上為猜測,有機會驗證一下。
所以在安裝的時候就考慮清楚,設定好引數最為簡單。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/758322/viewspace-682604/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Innodb plugins 的安裝(一)Plugin
- Innodb plugins 的安裝(二)Plugin
- Android studio 安裝PluginsAndroidPlugin
- 一種快速安裝InnoDB Cluster的方法
- CentOS原始碼安裝、配置Nagios(core)+PluginsCentOS原始碼iOSPlugin
- mysql Innodb表空間解除安裝、遷移、裝載的使用方法MySql
- 三、Docker安裝Docker
- IDEA Plugins:Show Comment(快捷顯示註釋)安裝及使用IdeaPlugin
- MySQL事務資料庫(InnoDB型別)的安裝方法(轉)MySql資料庫型別
- DG_安裝三
- MySQL Innodb表空間解除安裝和遷移案例MySql
- Mysql innodb引擎(三) 事務MySql
- ZooKeeper三種安裝模式模式
- Oracle GoldenGate安裝(三)OracleGo
- OpenStack安裝(三) Nova模組
- Statspack之三-安裝statspack
- elk的安裝部署三(kibana的安裝及使用filebeat收集日誌)
- etcd套路(三)etcd的安裝
- ubuntu下安裝程式的三種方法Ubuntu
- 如何安裝leapftp,教你三步安裝好leapftpFTP
- Mvvmcross Plugins - Cirrious.MvvmCross.Plugins.MessengerMVVMROSPluginMessenger
- Jquery PluginsjQueryPlugin
- Go 1.8 的 Plugins 使用GoPlugin
- InnoDB文件筆記(三)—— Undo Log筆記
- InnoDB學習(三)之BinLog
- oracle管理(三)安裝軟體Oracle
- CentOS 安裝 jdk1.8 的三種方法CentOSJDK
- k8s的安裝及使用(三)K8S
- Linux 軟體安裝的三種方式Linux
- 安裝Ubuntu前三件重要的事情Ubuntu
- Homebrew 的安裝方法(官方的方法老師安裝失敗) 第三方
- Python 安裝第三方模組的三種方法Python
- MYSQL + MHA +keepalive + VIP安裝配置(三)--keepalived安裝配置MySql
- Solaris裸裝置安裝三節點RAC102(三)
- Unity Plugins的使用方法UnityPlugin
- Linux centOS軟體安裝的三種方式LinuxCentOS
- Linux 下的三大軟體安裝方式Linux
- Centos7.7 安裝FreeIPA (三)CentOS