I need to run a query to populate a memory table on every MySQL start.
Is there any way to do this?
MySQL is able to read statements from init_file on startup.
You'd have to place the following in my.ini or my.cnf (depending on the OS) file
[mysqld]
init-file="/path/to/your/query/populate_memory_table.sql"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With