I did this in 3 parts, mainly because we have more than just alignment setting at restart.
First, i'm assuming that you have your own restart "system", either a bat file, firedaemon, what have you.
First, set up the alignment as a procedure (just to keep things clean)
The below set's the alignment to 100. In Heidi, right click and create a procedure, place this code in it's body.
- Code: Select all
BEGIN
UPDATE `character` set alignment = 1000000;
END
Save the proc.
Then, create a .sql file in something like a scripts directory somewhere. You can use this .sql file for other things as well if you need things to happen at restart.
In the .sql file place the following:
- Code: Select all
CALL p_SetAlignment();
In this case, I named the procedure from the earlier step p_SetAlignment.
Then, as part of your restart bat or firedaemon. Add the following (NOTE: this is in .bat format)
- Code: Select all
set bin=C:\Path\To\MariaDB 5.5\bin
"%bin%/mysql" --user=root --password=whatever DBName < C:\Path\To\SQLFile.sql
This will run that custom .sql file on the server where DBName is the name you gave the database for your LiF server.
This isn't the only way to do it, but it's the way that works best for us as I have more procedures being called in the .sql file and I only have to add 1 line in the restart portion to get the job done.