留点后路
万事不可做太绝

添加skip-innodb后MySQL启动失败

在小内存的VPS上,童鞋们(包括我)一般都爱做下所谓的“优化”,其中针对MySQL的优化中,有这样三个参数:

skip-innodb / skip-bdb / skip-locking

特别是第一个参数,据说打开后很省内存,所以我在安装完MySQL之后就在my.cnf中填上了这三个参数,但很不幸,在随后的service mysqld restart中,数据库启动失败。这还得了?!于是乎着急毛慌地请教Google去了,不过可悲的是在国内互联网“天下文章一大抄”的现状下,找个准确的、经过个人实践的答案相当不容易,我的问题最终也没解决。

后来想到去看看我的MySQL版本,一看是5.1.54,而且同时在my.cnf中发现一个skip-external-locking参数,在请教过Google后得知:skip-external-locking就是新版本的skip-locking,skip-locking是早几辈子的事了,而且在新版本的MySQL中,已经废除了skip-bdb这个参数!到这基本上问题就解开了,既然skip-locking都改了,那skip-innodb没准儿也改了!最终在MySQLd的文档中找到了这样一句话:

If InnoDB hasn’t been built, the option –skip-innodb isn’t available.  We prefix with ‘loose’ to allow the option to be used at all times. (详情点这里

这就明白了,skip-innodb已经改成loose-skip-innodb了,我还傻乎乎地硬把几年前的老黄历往里塞,真是不假思索的照搬照抄啊,羞愧羞愧!!

 

未经允许不得转载:留点后路 » 添加skip-innodb后MySQL启动失败

评论 37

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #33

    没注意,不懂,我路过。

    an99年前 (2011-06-20)Reply
  2. #32

    没注意,不懂,我路过。

    an99年前 (2011-06-20)Reply
  3. #31

    没注意,不懂,我路过。

    an99年前 (2011-06-20)Reply
  4. #30

    没注意,不懂,我路过。

    an99年前 (2011-06-20)Reply
  5. #29

    没注意,不懂,我路过。

    an99年前 (2011-06-20)Reply
  6. #28

    If you dont want to use InnoDB tables you can.add the skip-innodb option to your MySQL option file…..Two important disk-based resources managed by the InnoDB storage.engine are its tablespace data files and its log files…..If you specify no InnoDB configuration options MySQL 4.0 and.above creates an auto-extending 10MB data file named ibdata1 and.two 5MB log files named ib logfile0 and ib logfile1 in the MySQL data directory.. In MySQL 4.0.0 and 4.0.1 the data file is 64MB and not auto-extending. .In MySQL 3.23 InnoDB will not start if you provide no configuration.options…..Note To get good performance you should explicitly provide.InnoDB parameters as discussed in the following examples. See the description for innodb buffer pool awe mem mb in.section …..How to tune other mysqld server parameters?.The following values are typical and suit most users ….. mysqld .skip-external-locking.set-variable max connections 200.set-variable read buffer size 1M.set-variable sort buffer size 1M. . Set key buffer to 5 – 50 of your RAM depending on how much. you use MyISAM tables but keep key buffer size InnoDB. buffer pool size 80 of your RAM.set-variable key buffer size ……..

    hemp9年前 (2011-06-15)Reply
  7. #27

    If you dont want to use InnoDB tables you can.add the skip-innodb option to your MySQL option file…..Two important disk-based resources managed by the InnoDB storage.engine are its tablespace data files and its log files…..If you specify no InnoDB configuration options MySQL 4.0 and.above creates an auto-extending 10MB data file named ibdata1 and.two 5MB log files named ib logfile0 and ib logfile1 in the MySQL data directory.. In MySQL 4.0.0 and 4.0.1 the data file is 64MB and not auto-extending. .In MySQL 3.23 InnoDB will not start if you provide no configuration.options…..Note To get good performance you should explicitly provide.InnoDB parameters as discussed in the following examples. See the description for innodb buffer pool awe mem mb in.section …..How to tune other mysqld server parameters?.The following values are typical and suit most users ….. mysqld .skip-external-locking.set-variable max connections 200.set-variable read buffer size 1M.set-variable sort buffer size 1M. . Set key buffer to 5 – 50 of your RAM depending on how much. you use MyISAM tables but keep key buffer size InnoDB. buffer pool size 80 of your RAM.set-variable key buffer size ……..

    hemp9年前 (2011-06-15)Reply
  8. #26

    If you dont want to use InnoDB tables you can.add the skip-innodb option to your MySQL option file…..Two important disk-based resources managed by the InnoDB storage.engine are its tablespace data files and its log files…..If you specify no InnoDB configuration options MySQL 4.0 and.above creates an auto-extending 10MB data file named ibdata1 and.two 5MB log files named ib logfile0 and ib logfile1 in the MySQL data directory.. In MySQL 4.0.0 and 4.0.1 the data file is 64MB and not auto-extending. .In MySQL 3.23 InnoDB will not start if you provide no configuration.options…..Note To get good performance you should explicitly provide.InnoDB parameters as discussed in the following examples. See the description for innodb buffer pool awe mem mb in.section …..How to tune other mysqld server parameters?.The following values are typical and suit most users ….. mysqld .skip-external-locking.set-variable max connections 200.set-variable read buffer size 1M.set-variable sort buffer size 1M. . Set key buffer to 5 – 50 of your RAM depending on how much. you use MyISAM tables but keep key buffer size InnoDB. buffer pool size 80 of your RAM.set-variable key buffer size ……..

    hemp9年前 (2011-06-15)Reply
  9. #25

    If you dont want to use InnoDB tables you can.add the skip-innodb option to your MySQL option file…..Two important disk-based resources managed by the InnoDB storage.engine are its tablespace data files and its log files…..If you specify no InnoDB configuration options MySQL 4.0 and.above creates an auto-extending 10MB data file named ibdata1 and.two 5MB log files named ib logfile0 and ib logfile1 in the MySQL data directory.. In MySQL 4.0.0 and 4.0.1 the data file is 64MB and not auto-extending. .In MySQL 3.23 InnoDB will not start if you provide no configuration.options…..Note To get good performance you should explicitly provide.InnoDB parameters as discussed in the following examples. See the description for innodb buffer pool awe mem mb in.section …..How to tune other mysqld server parameters?.The following values are typical and suit most users ….. mysqld .skip-external-locking.set-variable max connections 200.set-variable read buffer size 1M.set-variable sort buffer size 1M. . Set key buffer to 5 – 50 of your RAM depending on how much. you use MyISAM tables but keep key buffer size InnoDB. buffer pool size 80 of your RAM.set-variable key buffer size ……..

    hemp9年前 (2011-06-15)Reply
  10. #24

    If you dont want to use InnoDB tables you can.add the skip-innodb option to your MySQL option file…..Two important disk-based resources managed by the InnoDB storage.engine are its tablespace data files and its log files…..If you specify no InnoDB configuration options MySQL 4.0 and.above creates an auto-extending 10MB data file named ibdata1 and.two 5MB log files named ib logfile0 and ib logfile1 in the MySQL data directory.. In MySQL 4.0.0 and 4.0.1 the data file is 64MB and not auto-extending. .In MySQL 3.23 InnoDB will not start if you provide no configuration.options…..Note To get good performance you should explicitly provide.InnoDB parameters as discussed in the following examples. See the description for innodb buffer pool awe mem mb in.section …..How to tune other mysqld server parameters?.The following values are typical and suit most users ….. mysqld .skip-external-locking.set-variable max connections 200.set-variable read buffer size 1M.set-variable sort buffer size 1M. . Set key buffer to 5 – 50 of your RAM depending on how much. you use MyISAM tables but keep key buffer size InnoDB. buffer pool size 80 of your RAM.set-variable key buffer size ……..

    hemp9年前 (2011-06-15)Reply
  11. #23

    希望支持博主,特来顶!

    度假啦实景旅游网9年前 (2011-06-14)Reply
  12. #22

    希望支持博主,特来顶!

    度假啦实景旅游网9年前 (2011-06-14)Reply
  13. #21

    希望支持博主,特来顶!

    度假啦实景旅游网9年前 (2011-06-14)Reply
  14. #20

    希望支持博主,特来顶!

    度假啦实景旅游网9年前 (2011-06-14)Reply
  15. #19

    希望支持博主,特来顶!

    度假啦旅游网9年前 (2011-06-14)Reply
  16. #18

    还是仔细点好啊~~

    qsduoduo9年前 (2011-06-13)Reply
  17. #17

    还是仔细点好啊~~

    qsduoduo9年前 (2011-06-13)Reply
  18. #16

    还是仔细点好啊~~

    qsduoduo9年前 (2011-06-13)Reply
  19. #15

    还是仔细点好啊~~

    qsduoduo9年前 (2011-06-13)Reply
  20. #14

    呵呵,我也是犯这样的错=。=

    mr.z9年前 (2011-06-13)Reply
  21. #13

    呵呵,我也是犯这样的错=。=

    mr.z9年前 (2011-06-13)Reply
  22. #12

    呵呵,我也是犯这样的错=。=

    mr.z9年前 (2011-06-13)Reply
  23. #11

    呵呵,我也是犯这样的错=。=

    mr.z9年前 (2011-06-13)Reply
  24. #10

    呵呵,我也是犯这样的错=。=

    Mr.z9年前 (2011-06-13)Reply
    • 还是仔细点好啊~~

      qsduoduo9年前 (2011-06-13)Reply
  25. #9

    恩~~

    qsduoduo9年前 (2011-06-13)Reply
  26. #8

    恩~~

    qsduoduo9年前 (2011-06-13)Reply
  27. #7

    恩~~

    qsduoduo9年前 (2011-06-13)Reply
  28. #6

    恩~~

    qsduoduo9年前 (2011-06-13)Reply
  29. #5

    看不懂,瞎看,哈哈

    ExMings9年前 (2011-06-12)Reply
  30. #4

    看不懂,瞎看,哈哈

    ExMings9年前 (2011-06-12)Reply
  31. #3

    看不懂,瞎看,哈哈

    ExMings9年前 (2011-06-12)Reply
  32. #2

    看不懂,瞎看,哈哈

    ExMings9年前 (2011-06-12)Reply
  33. #1

    看不懂,瞎看,哈哈

    ExMing9年前 (2011-06-12)Reply
    • 恩~~

      qsduoduo9年前 (2011-06-13)Reply

后路哥-主机服务

独立服务器台湾云主机