init_file: Run SQL file on startup
Add the following paramter to the [mysqld]
or [mariadb]
section of your my.cnf
file (depending on the OS, at /etc/mysql/my.cnf
, /etc/my.cnf
, other path):
1 |
|
The /etc/mysql/init.sql
file can contain "any" SQL queries.
Example to enable / install the MariaDB Query Response Time Plugin plugin:
1 2 3 4 |
|
Note
There are other ways to install the plugin, but to "initially" flush the plugin's data the SET GLOBAL query_response_time_
can be useful to be run.