Home | Hardware | Internet News |Web Hosting |IT Management |Network Storage
LinuxPlanet
Search 
  Power Search | Tips 

 Front Door
 Discussion
 LinuxEngine
 Opinions
 Reports
 Reviews
 Tutorials
 News
 Technology Jobs

 Browse by subject.
Free Newsletter

Linux Planet
Linux Today
More Free Newsletters

Be a Commerce Partner


















internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

Print this article
Email this article

   LinuxPlanet / Tutorials



MySQL Storage Engines
Using an Engine

Martin C. Brown
Friday, October 7, 2005 12:17:56 AM

There are a number of ways you can specify the storage engine to use. The simplest method, if you have a preference for a engine type that fits most of your database needs to set the default engine type within the MySQL configuration file (using the option storage_engine or when starting the database server (by supplying the --default-storage-engine or --default-table-type options on the command line).

More flexibility is offered by allowing you specify the storage engine to use MySQL, the most obvious is to specify the engine type when creating the table:

CREATE TABLE mytable (id int, title char(20)) ENGINE = INNODB

You can also alter the storage engine used for an existing table:

ALTER TABLE mytable ENGINE = MyISAM

However, you should be careful when altering table types in this way as making a modification to a type that does not support the same indexes, field types or sizes may mean that you lose data. If you specify a storage engine that doesn't exist in the current database then a table of type MyISAM (the default) is created instead.

Next: Differentiating the Engines »

Skip Ahead

1 What is a Storage Engine?
2 Determining Available Engines
3 Using an Engine
4 Differentiating the Engines
5 Storage Engines: MyISAM, MERGE, MEMORY, EXAMPLE
6 Storage Engines: FEDERATED, ARCHIVE, CSV, BLACKHOLE
7 Storage Engines: ISAM, Berkeley DB (BDB), InnoDB
8 Summary





Linux is a trademark of Linus Torvalds.


internet.com home | search | help! | about us

Jupiter Online Media

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers