Life without transactions (MyISAM)
Asked Answered
S

2

9

My site runs on a VDS-server. I've just found out that my MySQL server doesn't support InnoDB engine, therefore I can't use database transactions in my application.

It makes me think, that some people might never use transactions. Is this the case? If so, how does one manage to coordinate related operations on different tables in MyISAM?

Otherwise, is there a way to install InnoDB on a MySQL server which is run on a VDS?

Thanks!

Schoolmaster answered 28/8, 2012 at 23:33 Comment(2)
Who is your hosting provider that your VDS is with?Boden
VDS64.com – these guys are great.Schoolmaster
B
11

If you need transactions, then you need transactions and MyISAM isn't going to cut the mustard.

Some applications won't need transactions. For example; an application that never runs more than one related SQL statement at a time and has no need to rollback multiple SQL statements. Another example is an application that uses MySQL as a simple Key-Value Store. There are many use cases that don't require database level transaction support.

It's hard to answer the second part of your question without knowing more details about your VDS. Who is you hosting provider? Do you have shell access and permissions to change my.cnf? If not, then you probably won't be able to enable InnoDB. If you do, then here is a another SO answer that details how to enable InnoDB on MySQL: How to enable INNODB in mysql

Boden answered 28/8, 2012 at 23:44 Comment(1)
Thanks! I just changed skip-innodb into innodb=ON in my.cnf, converted my tables, and now everything works fine!Schoolmaster
A
4

You can often either enable the engine, install the InnoDB components manually, or simply re-install a version of MySQL that includes that engine by default. MyISAM is the crazypants database, stupidly fast but also unreliable and prone to complete destruction if your system isn't shut down properly.

Running a mission critical application on MyISAM is an extremely bad idea. Where you need MyISAM tables for performance reasons they should always be disposable, easily re-built from another more reliable source of data.

Aun answered 28/8, 2012 at 23:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.