Jump to content
Mingus

SQL Database Creation

Recommended Posts

Hi, I'm in the process of setting up a vanilla DayZ mod server on an unmanaged VPS that I rent. The server is up and running and everything seems to be working alright, except for one thing. No vehicles are spawning/spawned. 

 

Now, I'm certainly not a professional at this so if I'm on the wrong track here please tell me. I'm wondering if when the database was created I did something wrong. What I did was make a database called 'dayzhivemind', loaded each of the 1.8.6.1 SQL scripts, and ran them. Some gave warnings about the @ symbol, which I guess is why I think I did something wrong. Are there any more comprehensive guides on database creation? Am I supposed to be editting the SQL scripts before running them?

 

Am I even on the right track?

 

 

Share this post


Link to post
Share on other sites

After looking into server packages offered by other users I came across the following line in their startup BAT file. I believe that it has fixed my issue.

.\MySQL\bin\mysql.exe --user=dayz --password=dayz --host=127.0.0.1 --port=3306 --database=hivemind --execute="call pMain(1)"

Share this post


Link to post
Share on other sites

 

After looking into server packages offered by other users I came across the following line in their startup BAT file. I believe that it has fixed my issue.

.\MySQL\bin\mysql.exe --user=dayz --password=dayz --host=127.0.0.1 --port=3306 --database=hivemind --execute="call pMain(1)"

 

 

The way you go about setting up a server is the following:

 

  1. Set up MySQL Server
  2. Create Database for DayZ
  3. Execute Scripts provided with serverpackage

 

That should really be all to set up the SQL Server. To set up the MySQL Server, it's fine to just something like for example "XAMPP" for easy setup.

 

The way it works with the vehicles is the following:

 

there's a procedure within the SQL Server that is being exectued every 3 hours and that spawns the vehicles. If you set up your server with a different instance ID (speicified in your missionfil in the init.sqf) than "1" (default is "1337"), you will have to change the value of the function being called in your procedure.

 

That is what "Call pMain(1)" does. The "1" being your server's instance. If you didn't change the default you will have to call / Execute "pMain(1337)" in your SQL Server.

 

Hope that somewhat helps - if not, ask.

  • Like 1

Share this post


Link to post
Share on other sites

Thank you for your reply kichilron. While the bat I mentioned above will manually run pMain it is cumbersome and the database isn't really working as it was intended. After some sleuthing work I discovered the event_scheduler table which indicated that the 3h updates event was not triggering successfully. All of the other events had recent timestamps (likely from pMain being manually triggered) except for the 3hRespawns line, which looked to be the event that triggered pMain from within the database.

 

Long story short - MySQL seems to have the event scheduler function disabled by default. A quick change in Workbench, and a restart, and everything was working as intended.

 

Thanks for the help! 

Share this post


Link to post
Share on other sites

Thank you for your reply kichilron. While the bat I mentioned above will manually run pMain it is cumbersome and the database isn't really working as it was intended. After some sleuthing work I discovered the event_scheduler table which indicated that the 3h updates event was not triggering successfully. All of the other events had recent timestamps (likely from pMain being manually triggered) except for the 3hRespawns line, which looked to be the event that triggered pMain from within the database.

 

Long story short - MySQL seems to have the event scheduler function disabled by default. A quick change in Workbench, and a restart, and everything was working as intended.

 

Thanks for the help! 

I just noticed my Event_Scheduler is disabled.  I can't figure out how you "made a quick change in Workbench"  can you steer a blind man in the right direction??  : )

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×