日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 人文社科 > 生活经验 >内容正文

生活经验

mysql innodb 设置,Mysql5.5 InnoDB存储引擎简单设置

發布時間:2023/11/27 生活经验 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 mysql innodb 设置,Mysql5.5 InnoDB存储引擎简单设置 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

環境為CentOS系統,1G內存,Mysql5.5.30。

在/etc/my.cnf內添加:

skip-external-locking

skip-name-resolve

max_connections = 1024

query_cache_size = 16M

sort_buffer_size = 1M

table_cache = 256

innodb_buffer_pool_size = 128M

innodb_additional_mem_pool_size = 4M

innodb_log_file_size = 128M

innodb_log_files_in_group = 2

innodb_log_buffer_size = 2M

innodb_flush_log_at_trx_commit = 1

修改前先將mysql服務停止:

service mysqld restart

由于修改了日志大小重啟會報錯:

130319 04:45:14 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

130319 05:02:43 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

130319 5:02:54 [Note] Plugin ‘FEDERATED’ is disabled.

130319 5:02:59 InnoDB: The InnoDB memory heap is disabled

130319 5:02:59 InnoDB: Mutexes and rw_locks use InnoDB’s own implementation

130319 5:02:59 InnoDB: Compressed tables use zlib 1.2.3

130319 5:02:59 InnoDB: Using Linux native AIO

130319 5:03:01 InnoDB: Initializing buffer pool, size = 128.0M

130319 5:03:02 InnoDB: Completed initialization of buffer pool

InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes

InnoDB: than specified in the .cnf file 0 134217728 bytes!

130319 5:03:02 [ERROR] Plugin ‘InnoDB’ init function returned error.

130319 5:03:02 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.

130319 5:03:02 [ERROR] Aborting

將/var/lib/mysql下原先的ib_logfile0、ib_logfile1刪除再重啟mysql。

service mysqld start

正常啟動:

130319 05:20:59 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

130319 05:22:53 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

130319 5:22:56 [Note] Plugin ‘FEDERATED’ is disabled.

130319 5:22:57 InnoDB: The InnoDB memory heap is disabled

130319 5:22:57 InnoDB: Mutexes and rw_locks use InnoDB’s own implementation

130319 5:22:57 InnoDB: Compressed tables use zlib 1.2.3

130319 5:22:57 InnoDB: Using Linux native AIO

130319 5:22:57 InnoDB: Initializing buffer pool, size = 128.0M

130319 5:22:57 InnoDB: Completed initialization of buffer pool

130319 5:22:57 InnoDB: highest supported file format is Barracuda.

130319 5:22:58 InnoDB: Waiting for the background threads to start

130319 5:22:59 InnoDB: 5.5.30 started; log sequence number 2621452

130319 5:22:59 [Note] Server hostname (bind-address): ‘0.0.0.0’; port: 3306

130319 5:22:59 [Note] – ‘0.0.0.0’ resolves to ‘0.0.0.0’;

130319 5:22:59 [Note] Server socket created on IP: ‘0.0.0.0’.

130319 5:23:00 [Warning] ‘proxies_priv’ entry ‘@ root@server08’ ignored in –skip-name-resolve mode.

130319 5:23:04 [Note] Event Scheduler: Loaded 0 events

130319 5:23:04 [Note] /usr/libexec/mysqld: ready for connections.

Version: ‘5.5.30’ socket: ‘/var/lib/mysql/mysql.sock’ port: 3306 MySQL Community Server (GPL) by Remi

使用mysqladmin variables命令可查看所有參數變量。

參考資料:

http://www.linuxyan.com/database/106.html

總結

以上是生活随笔為你收集整理的mysql innodb 设置,Mysql5.5 InnoDB存储引擎简单设置的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。