Webhost 不支持 InnoDB。现在怎么办?
我正在我的笔记本电脑上开发一个小型 WAMP Web 应用程序,其中运行着一个 mySQL 实例,并且我选择 InnoDB 作为我的数据库引擎。经过几周的开发,我想让它向公众开放,却发现我的虚拟主机提供的数据库服务器不支持 InnoDB,只支持 MyISAM。
从我的笔记本电脑上的 innoDB 模式生成的创建和填充脚本,当针对实时数据库执行时,可以设法创建单独的表,但随后在创建视图时遇到问题。 MyISAM 不支持视图吗?我知道外键不是。这就是我选择 InnoDB 的原因...让我的 innoDB 模式设计与 myISAM 一起工作的机会有多大?
是否有任何直接的方法可以将整个模式从一个存储引擎转换为另一种存储引擎?我应该寻找另一个提供支持 innoDB 的 mysql 数据库的 Web 主机吗?
I was developing a small WAMP web application on my laptop, where I have an instance of mySQL running and I chose InnoDB for my DB engine. After several weeks' development I wanted to make it available to the public and found out the database server provided by my web host does not support InnoDB, only MyISAM.
The create-and-populate script generated from the innoDB schema on my laptop, when executed against the live database, can manage to create individual TABLES but then runs into problems creating the VIEWs. Are views not supported in MyISAM? I know FOREIGN KEYs are not. That's very much why I made the choice of InnoDB... What are my chances of making my innoDB schema design work with myISAM?
Is there any straightforward way of converting the whole schema from one storage engine to the other? Should I look for another web host that does provide a mysql db that supports innoDB?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您的选择:
就我个人而言,我认为第 4 种解决方案是最糟糕的。如今有许多网络托管提供商支持 InnoDB,因此重新编码大部分应用程序以使用 MyISAM 会浪费您的时间。当然,这取决于应用程序的规模和复杂程度。如果它相对较小,这可能不是一个坏主意。
我可能会寻找新的网络托管提供商。
Your options:
Personally, I think number 4 is the worst solution. There are many web hosting providers that support InnoDB these days so it would be waste of your time to recode much of your application to work with MyISAM. This, of course, depends on how large and complex the application is. If it's relatively small, it might not be as bad idea.
I would probably look for a new web hosting provider.
是的,但是 InnoDB 还有许多其他功能,例如事务和行锁定(而不是表锁定)。
Yes, but InnoDB has a number of other features like transactions and row-locking (rather than table locking).
这与 InnoDB 与 MyISAM 无关:两种表类型都支持视图。我认为这要么是版本问题(Views [. ..] 在 MySQL Server 5.0 中可用)或关于 授权表。
如果您发布收到的确切错误消息,将会有所帮助。
it is not about InnoDB vs. MyISAM: Views are supported on both table types. i would think it is either a version issue (Views [...] are available in MySQL Server 5.0) or about the grant tables.
it would help if you would post the exact error messages you are getting.