Question

I want a stored procedure to execute so that it updates a specific column in a table every time mysql server is started (to be precise when windows boots and mysql is started as a part of service automatically).

Can somebody point out the syntax? Or the care to be taken to do something like this.

I know the events were included as a part of 5.1 realease. Is it possible to do the above execution when mysql start in 5.0 release. But we are able to schedule at a specific time interval but not when mysql starts.

We would like to avoid window-services.

regards...

Kalpak

Was it helpful?

Solution

you can use the init-file variable in your configuration file to run a text file containing SQL statements in it.

but what do you want to run on startup? there's probably already something in mysql that does what you want to do without resorting to "magic".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top