MySQL默认情况下是否启用INNODB? [英] Is INNODB enabled by default in MySQL?

查看:389
本文介绍了MySQL默认情况下是否启用INNODB?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发计划使用InnoDB的Web应用程序.但是我读到有时InnoDB有时默认情况下未启用,并且需要更改mysql配置以启用它.由于我的Web应用程序将由客户端自己安装在自己的Web空间上,因此我需要确保我的应用程序尽可能兼容.如果默认情况下禁用InnoDB,那么我必须寻找解决方法.

I am developing a web app for which I plan to use InnoDB. However I read that sometimes InnoDB is not enabled by default and, one needs to change mysql config to enable it... Is that true? Since my web app will be installed by client themselves on their own web space, I need to make sure my app is as compatible as possible. If InnoDB is disabled by default, then I have to look for workarounds.

推荐答案

InnoDB自MySQL 4.0起就存在,并且已被编译到除某些特殊版本(如OEM供应商所提供的版本)之外的大多数发行版中.

InnoDB has been around since MySQL 4.0, and compiled in to most releases except for some special ones - like what is given to OEM vendors.

一些(非常便宜)的托管服务提供商选择禁用它,因为它使用了更多的内存.不过,在大多数情况下,它们只是少数派,因此您不必担心.

Some (very cheap) hosting providers choose to disable it because it uses a little bit more memory. For the most part they are in the minority though, so you shouldn't need to worry.

默认存储引擎"一词也不必与您有关.这只是意味着当您不指定一个时会发生什么.即

The wording "default storage engine" shouldn't need to concern you either. That just means what happens when you don't specify one. i.e.

CREATE TABLE my_table (a int);
- instead of -
CREATE TABLE my_table (a int) ENGINE=INNODB;

如果要从mysqldump恢复,它将保留ENGINE信息.如果InnoDB不存在,MySQL将自动替换MyISAM(除非您更改默认的sql_mode以避免这种替换).

If you are restoring from mysqldump, it will retain the ENGINE information. If InnoDB doesn't exist, MySQL will automatically substitute MyISAM (unless you change the default sql_mode to avoid this substitution).

这篇关于MySQL默认情况下是否启用INNODB?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆