1、org.hibernate.dialect.MySQL55Dialect
This configuration is recommended. The mysql engine used is InnoDB, and foreign keys, transactions, etc. can be created when automatically creating tables.
2、org.hibernate.dialect.MySQL5Dialect
There is no problem with adding, deleting, checking and modifying database data, that is, an error occurs when the DDL is required to update the table structure after the structure of the class changes, and the database engine used is engine=MyISAM. MyISAM does not support foreign keys, etc., so an error is reported.
3、org.hibernate.dialect.MySQL57Dialect
This configuration is also possible. MySQL57Dialect inherits from MySQL55Dialect and adds some new features. From the source code analysis, it can be seen that MySQL57Dialect is for the mysql5.7.x version. It can be seen that the support for json columns and some time functions have been added. . I actually use mysql5.6.x, so I can only use MySQL55Dialect dialect
4、org.hibernate.dialect.MySQLInnoDBDialect
This is deprecated.
5. Here is a way to use idea to view the class hierarchy of database dialects
In the configuration file, hold down Ctrl and click on the specific dialect name, then open the dialect source code, press F4 to view the hierarchy of the current class, you can see which dialects are available, and then observe the source code or test.
6. MySQL8Dialect dialect, this one supports mysql8.0
For technical details, please refer to the following two articles on the
difference between MyISAM and InnoDB in the MySQL storage engine. Detailed explanation of
Hibernate's dialect.