Configuring XWiki. MySQL as database: hibernate properties

Hi! While configuring a brand new XWiki installation running XWiki 13.9 using MySQL 8.0.26 for Linux on x86_64 (Source distribution) I’m facing some doubts about the required changes in the hibernate.cfg.xml file. By now, I’m setting up a connection by fine-tuning that file. I’ll set up later a data source at the container level.

I’m copying here the current content of the page describing hibernate.cfg.xml configuration concerning MySQL

<property name="connection.url">jdbc:mysql://localhost/xwiki</property>
<property name="connection.username">xwiki</property>
<property name="connection.password">xwiki</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>
<property name="connection.useUnicode">true</property>
<property name="connection.characterEncoding">UTF-8</property>

And here what I find in my hibernate.cfg.xml file:

<property name="hibernate.connection.url">jdbc:mysql://localhost/xwiki?useSSL=false</property>
<property name="hibernate.connection.username">xwiki</property>
<property name="hibernate.connection.password">xwiki</property>
<property name="hibernate.connection.driver_class">com.mysql.cj.jdbc.Driver</property>
<property name="hibernate.dbcp.poolPreparedStatements">true</property>
<property name="hibernate.dbcp.maxOpenPreparedStatements">20</property>

<property name="hibernate.connection.charSet">UTF-8</property>
<property name="hibernate.connection.useUnicode">true</property>
<property name="hibernate.connection.characterEncoding">utf8</property>

<mapping resource="xwiki.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
<mapping resource="instance.hbm.xml"/>
<mapping resource="notification-filter-preferences.hbm.xml"/>
<mapping resource="mailsender.hbm.xml"/>

My point: should we remove these lines from the page about configuration and simply advise reviewing and comment and uncomment the concerned lines in the hibernate.cfg.xml file included with each release? Besides, is it required to specify the dialect? Or, it is not specified, the system can make the current guess it from JDBC metadata?

One more thing: should we always use UTF-8 instead of utf8 as far as we don’t face a special requirement and always be coherent within the same file.

Thanks!