MariaDB: Difference between revisions
>Samthecrazyman Complete changed to MariaDB |
m Changed InnoDB section to reflect MariaDB |
||
| Line 30: | Line 30: | ||
=== InnoDB separate tables === | === InnoDB separate tables === | ||
By default, | <div style="background:#FFEEEE;border:1px solid #FF0000;"> | ||
'''MariaDB does not use the InnoDB storage engine by default. If you are using MariaDB with standard settings, these settings will have no effect and so don't need to be done.''' | |||
</div> | |||
By default, MySQL uses InnoDB to store the information in the database. MariaDB uses XtraDB. The old method, MyIASM stored the data within the database folder on the hard drive separately. InnoDB now stores this data for all created databases under one file called <code>ibdata1</code>. There are a few problems with this implementation: | |||
* All data stored under one file means if this one file becomes corrupt, you are more likely to loose '''ALL''' the databases you have. | * All data stored under one file means if this one file becomes corrupt, you are more likely to loose '''ALL''' the databases you have. | ||
* A problem in InnoDB makes it so that when you drop a table, the space is not freed from the file, the table is basically unlinked from the data. This can be a security issue if you are working with sensitive data. Another problem means that the file will never shrink, the file will grow until all space is exhausted. | * A problem in InnoDB makes it so that when you drop a table, the space is not freed from the file, the table is basically unlinked from the data. This can be a security issue if you are working with sensitive data. Another problem means that the file will never shrink, the file will grow until all space is exhausted. | ||
* Once set up in the mode, any database created before this change will still be stored in the one file. The only way to make it use it's own table is by [[Exporting a MySQL database|exporting]] the database dropping the table and then [[Importing a MySQL database|importing]] the database again. | * Once set up in the mode, any database created before this change will still be stored in the one file. The only way to make it use it's own table is by [[Exporting a MySQL database|exporting]] the database dropping the table and then [[Importing a MySQL database|importing]] the database again. | ||
MySQL does let you fall back to the old MyIASM method of storing the data while using the InnoDB storage method still. If you want to turn this option on, you will need to do the following: | |||
<ol> | <ol> | ||