Difference between revisions of "MySQL"
From OpenKM Documentation
(→Change mysql default engine to InnoDB) |
|||
Line 14: | Line 14: | ||
* [[MySQL-OpenKM 4.1 | OpenKM 4.1]] [[File:Padlock.gif]] | * [[MySQL-OpenKM 4.1 | OpenKM 4.1]] [[File:Padlock.gif]] | ||
− | == Change | + | == Change MySQL default engine to InnoDB == |
Check if your MySQL installation has InnoDB engin enabled: | Check if your MySQL installation has InnoDB engin enabled: | ||
Line 25: | Line 25: | ||
{{Advice|[http://en.wikipedia.org/wiki/InnoDB InnoDB] is the preferred engine because it support transactions. [http://en.wikipedia.org/wiki/MyISAM MyISAM] is more responsive but does not support transactions.}} | {{Advice|[http://en.wikipedia.org/wiki/InnoDB InnoDB] is the preferred engine because it support transactions. [http://en.wikipedia.org/wiki/MyISAM MyISAM] is more responsive but does not support transactions.}} | ||
+ | |||
+ | If you want to show which engine is using every table, do: | ||
+ | |||
+ | <source lang="sql"> | ||
+ | SHOW TABLE STATUS WHERE name like 'OKM_%' | ||
+ | </source> | ||
== Database repair == | == Database repair == |
Revision as of 09:06, 3 April 2013
Download MySQL JDBC driver from MySQL Home Page and move it to $JBOSS_HOME/server/default/lib.
- OpenKM 6.0 (also valid for OpenKM 6.1)
- OpenKM 5.0 (also valid for OpenKM 5.1)
- OpenKM 4.1
Change MySQL default engine to InnoDB
Check if your MySQL installation has InnoDB engin enabled:
$ mysql -h localhost -u root -p mysql> show engines;
In order to change the default storage engine edit /etc/mysql/my.cnf and under [mysqld] section in your ini file, and add:
default-storage-engine = innodb
InnoDB is the preferred engine because it support transactions. MyISAM is more responsive but does not support transactions. |
If you want to show which engine is using every table, do:
SHOW TABLE STATUS WHERE name like 'OKM_%'
Database repair
If you have problems with a database and need to be repaired, you can use this command:
$ mysqlcheck -u root -p --auto-repair --optimize --all-databases
See also: