Sahrani Server Setup

No, actually it was a server fault, as i thought. I just made it working today. All problems were solved by this line in config:
hostname =
I didn't change it at all, but today i was pissed that my dayzcomm was showing 10000 ping, but i could connect to it. And when i added (0.2.1/103718), all was fixed. I see my server in dayzcomm with version numbers and normal ping and server is working, no more errors and i can play normally.
 
Like I said the problem was on your client side. Commander was not launching correctly because the server was not detected as a Sahrani server. Yes the server was at fault too. But the server was correct, just a problem you created while setting the name incorrectly.
 
Well, i didn't set the name at all. I didn't know it has to be changed. So for noobs like me, it should be in instruction :) Anyway thank You for help.
 
Notice another issues, Some guys can craft and then some can't. Anybody see issues with that. Like on guy can craft Gun Rack but can do the crates..
 
[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-- Script was generated by Devart dbForge Studio for MySQL, Version 5.0.97.0
' at line 1
[Err] -- Script was generated by Devart dbForge Studio for MySQL, Version 5.0.97.0
-- Product home page: http://www.devart.com/dbforge/mysql/studio
-- Script date 2/12/2013 2:03:03 AM
-- Server version: 5.5.30
-- Client version: 4.1

WHEN EXECUTE DATABASE.SQL
How to fix this?
 
by finding and fixing your SQL syntax error.

It's something in the setup.

I actually went and setup a server with these instructions and only had problems that ended up being my own errors... and I've only ever hosted managed servers before... I put this one together in a couple days and was only delayed by silly mistakes I made along the way in my modifications.

I don't even know what to ask you for, but that error is a general error we'd have to see the details of how you're launching and executing and accessing your SQL db.
 
Hi all,

When I want to setup my server but I've this error message in SQl :

"Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATE DEFINER = 'root'@'localhost' PROCEDURE pCleanup() BEGIN CALL pCleanupO' at line 5"

anybody have encounter this problem ?
Thnaks for your help :)
 
Hi all,

When I want to setup my server but I've this error message in SQl :

"Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATE DEFINER = 'root'@'localhost' PROCEDURE pCleanup() BEGIN CALL pCleanupO' at line 5"

anybody have encounter this problem ?
Thnaks for your help :)

The user root@localhost is not the one you use.

Edit the procedure, and insert the right user you use for your DB.
 
The user root@localhost is not the one you use.

Edit the procedure, and insert the right user you use for your DB.

Thanks for your reply but I don't understand.
On My SQL I've created a user "dayz" and I use it for my Db but I've try with the 2 users : dayz and root and I've the same error .

Sorry but on Mysql I started .
 
If you edit the procedure. You will see an 'identifier'

That will say 'root'@'localhost'

You need to change that to your DB user & pass.
 
When you say : edit the procedure it's the database.sql ?

Sorry but my english is not very good and i will maybe misundestood what tou say :p
 
Here is a basic MYSQL setup for Windows 7/8 32bit or 64bit for newbies.

Go to mysql web site and download the community Server version - mysql 5.5 ZIP archive
(yes there is a 5.6 But this tutorial was done with 5.5)
Choose the 64bit version if your Windows is 64bit.

http://dev.mysql.com/downloads/mysql/5.5.html#downloads

I got a zip file called mysql-5.5.33-winx64.zip

Unzip it to a folder called mysql. Arrange the contents so that the sql files are just sub-parents of your mysql folder.

I put these in the root of my F: drive for ease of access.

Now inside mysql folder you should see a my-large.ini file. Copy this to the same place but call it my-dayz.ini
This will be your mysql startup initialization settings.

Open this file with a text editor.

Look for a line that says:

Code:
[mysqld]
port      = 3306
If you are happy to use this port then leave alone, otherwise if you have this port number already in use set it to a different number. ie 3310, 3312, etc.
Save file.

Now create a batch file called START_MYSQL.BAT and place it within the mysql folder.

Make it like this:
Code:
@ECHO OFF
set mysqlport=3306
set mysqlpassword=
 
CLS
ECHO.
ECHO SQL STARTED
ECHO.
 
CLS
ECHO.
 
ECHO.
tasklist /FI "IMAGENAME eq mysqld.exe" 2>NUL | find /I /N "mysqld">NUL
if "%ERRORLEVEL%"=="1" (
@start bin\mysqld.exe --defaults-file=my-dayz.ini & echo "Please wait...Loading MySQL" & ping -n 8 127.0.0.1>nul
)
 
REM tasklist /FI "IMAGENAME eq mysqld.exe" 2>NUL | find /I /N "mysqld">NUL
if "%ERRORLEVEL%"=="1" (
@start bin\mysqld.exe --defaults-file=my-dayz.ini --standalone --console & echo "Please wait...Loading MySQL" & ping -n 8 127.0.0.1>nul
)
 
 
ECHO MYSQL IS RUNNING
 
 
ECHO.
ECHO PRESS A KEY TO SHUT IT DOWN
ECHO.
PAUSE
ECHO DB shutting down.....
"bin\mysqladmin" -u root -p%mysqlpassword% --port=%mysqlport% shutdown
 
ECHO MYSQL HAS SHUTDOWN
timeout /t 3
 
taskkill /IM mysqld.exe /F &

When you first set up a brand new MySQL the logon user is root and the password is set blank.
So in the above batch file set the port number you wish to use and leave the password line blank for now.

When you run this batch file from within the mysql folder it will run the MySQL server and wait until you press a key to shut it down correctly.

Note: It is important to shutdown your SQL server correctly and not just by killing it as a task (as some DayZ scripts tend to do) as it can corrupt the database tables. This script uses the correct mysqladmin command to do so.

You'll notice I've added two almost identical task starting lines.
The 2nd one with the REM at the start will launch MySQL with a separate console window so you can see error messages etc. if you think you are having problems with MySQL. Just unREM the 2nd line and REM the 1st. :)


To see/edit/alter the contents of a MySQL database you need a Viewer or 'workbench'.
I use the free HeidiSQL program. http://www.heidisql.com/
Install that.
You should be able to log onto your blank MySQL server by running the START_MYSQL and then running HeidiSQL and choose
Network type: MySQL (TCP/IP)
Hostname/IP: 127.0.0.1
Port: 3306 (unless you used a different one)
User: root
password: <nothing for now!>
Click on Open
Click on Yes to save modifications.
And you should see a blank default MySQL database with 4 blank databases in it. Ignore these.
Create a database called 'hivemind' by right clicking on the top name in the list in the left pane and choose 'create new>database'.

Then from your Sahrani server files you've no doubt already got, use the HeidiSQL 'tools> Load SQL file' option and load the 'database.sql' file. This is the default blank Sahrani database.

Once it is loaded, you need to 'execute SQL'. This creates the database. Look for the black right triangle icon in the HeidiSQL toolbar.

Hopefully all is ok and if you doubleclick on the hivemind database name in the left pane you'll see lots of Sahrani tables ready to be used.
For example click on hivemind>object_spawns and then in the right pane, click on 'data' and you should see a big pile of vehicle data in green.

Tip: To edit any item in the database, you double click on a field, edit it and then press Ctrl-Enter to actually put it into the database. You'll see the field with a red corner until it is correctly saved. This is a safety feature.

Once you're happy with a running MySQL server you can use think about changing the default blank password for root to something more secure.

To change it, right click on Tools within Heidi toolbar and choose User Manager.
Select the root user for 127.0.0.1 and reset the password to a nice complex one.
Do the same for the root user under 'localhost'.

Don't forget to alter the START_MYSQL.bat file line "set mysqlpassw=" as well of course. Tip: Don't put a space between the = and your new password.

By default the global privileges for root is set to ticked in Heidi. Leave them on unless you know better. :)

You can now add a user called 'dayz' from Host localhost (I assume the database is running on the same computer as the dayz server will be, if not change the IP address you enter here) and enter a different password. This will be used by the DayZ server its self to log on use and alter your SQL hivemind database.
Note: You should alter the Global privileges by turning a few things off. Just in case you get a Hacker.
I turn off: SHOW DATABASES, CREATE USER, SHUTDOWN, etc.
(But to begin with, you don't really have to.)

Now save.

There you're done.
MySQL can be run and stopped by the batch file.

Extra:
You can use HeidiSQL to check your SQL database for errors, etc. by using the Tools>Maintence option.
Ensure only hivemind is ticked in the Table tools window.
I use Operation: Optimize every week to tidy it up.
And Operation Check or Analyze and Repair if required.
You can automate these via more batch scripts if needed of course.

Typically example auto-check and repair:

Code:
@ECHO OFF
CLS
 
tasklist /FI "IMAGENAME eq mysqld.exe" 2>NUL | find /I /N "mysqld">NUL
if "%ERRORLEVEL%"=="1" (
  @start bin\mysqld.exe --defaults-file=my-dayz.ini & echo "Please wait...Loading" & ping -n 8 127.0.0.1>nul
)
 
 
set mysqlport=3306
set mysqlpassword=<whatever>
 
ECHO Testing MYSQL database....
ECHO.
MYSQLcheck -u root -p%mysqlpassword% --port=%mysqlport% -A
 
ECHO.
ECHO.
 
ECHO Press any key to repair (if required)
PAUSE
 
MYSQLcheck -u root -p%mysqlpassword% -A --auto-repair --port=%mysqlport% --optimize
 
ECHO.
ECHO.
ECHO.
ECHO Retesting database after repair...
ECHO.
MYSQLcheck -u root -p%mysqlpassword% --port=%mysqlport% -A
PAUSE
You'll need to look at this window to confirm there were no serious errors. :)

Hope this helps people. :)

If I've made a mistake, please excuse, I'm only a poor human...
 
Some people seem to be having trouble setting up servers. So this will be a guide on how to correctly setup a Sahrani Server.
  1. Update your Hive.ini and Config_*****.cfg with login details etc.
  2. Create your launcher
    Code:
    C:\Program Files\MySQL\MySQL Server 5.5\bin\mysql.exe --user=dayz --password=CHANGEME --host=localhost --port=3306 --database=hivemind --execute="call pMain()"
    start Expansion\beta\arma2oaserver.exe "-mod=Expansion\beta;Expansion\beta\Expansion" "-nosplash" "-cpuCount=1" "-name=Sara" "-profiles=dayz_1.sara" "-cfg=dayz_1.sara\basic.cfg" "-config=dayz_1.sara\config_1234567.cfg" "-mod=@DayZ_Sahrani;@Hive-Sara" "-world=sara" "-port=2402"
If you still manage to run into trouble please post it here, I will update the topic as more help is needed.

Thanks. :)

There is no files provided in the Sahrani server 0.78 zip that includes "dayz_1.sara", "basic.cfg", "hive.ini", "config_"etc.

Can you provide these files or point to a copy of them please?
 
Further note: the database.sql file provided in the 0.78 release is full of buggy vehicle spawn positions which will stop any vehicles spawning. Best to ask the Mod owners for a corrected version.
 
Hello ,

I'm trying to setup a Dayz Sahrani Server Hosted in France and i've completed the setup following the instructions here and when i start my server everything looks fine but when the user tries to enter the server gets stuck on "Waiting to Host". Looking at the logs i can't really find anything useful . Maybe some one can help me ?

Code:
=====================================================================
== C:\Program Files (x86)\Steam\SteamApps\common\Arma 2 Operation Arrowhead\Expansion\beta\arma2oaserver.exe
== Expansion\beta\arma2oaserver.exe  "-mod=Expansion\beta;Expansion\beta\Expansion" "-nosplash" "-cpuCount=1" "-name=Sara" "-profiles=mission_sahrani" "-cfg=dayz_1.sara\basic.cfg" "-config=cfgdayz\server.cfg" "-mod=@DayZ_Sahrani;@hive" "-world=sara" "-port=2402"
=====================================================================
Exe timestamp: 2013/09/30 23:12:33
Current time:  2013/10/01 01:11:50
 
Version 1.62.103718
Item STR_EQUIP_NAME_BANDIT listed twice
Item str_disp_mp_timeout listed twice
Item STR_AUTHOR_VILAS listed twice
Item STR_VIL_EASTERN listed twice
Item STR_VIL_WEAPONS listed twice
Unknown entity: 'C equipment, and then cause enough damage to render the target inoperative. The grenade has no propelling system in itself, instead being launched by special blank cartridges which are loaded into a detachable box magazine.</German>
        <English>From world.guns.ru: &lt'
Unknown entity: 'C equipment, and then cause enough damage to render the target inoperative. The grenade has no propelling system in itself, instead being launched by special blank cartridges which are loaded into a detachable box magazine.</English>
        <Italian>From world.guns.ru: &lt'
Unknown entity: 'C equipment, and then cause enough damage to render the target inoperative. The grenade has no propelling system in itself, instead being launched by special blank cartridges which are loaded into a detachable box magazine.</Italian>
        <Spanish>From world.guns.ru: &lt'
Unknown entity: 'C equipment, and then cause enough damage to render the target inoperative. The grenade has no propelling system in itself, instead being launched by special blank cartridges which are loaded into a detachable box magazine.</Spanish>
        <French>From world.guns.ru: &lt'
Unknown entity: 'C equipment, and then cause enough damage to render the target inoperative. The grenade has no propelling system in itself, instead being launched by special blank cartridges which are loaded into a detachable box magazine.</French>
        <Czech>From world.guns.ru: &lt'
Unknown entity: 'C equipment, and then cause enough damage to render the target inoperative. The grenade has no propelling system in itself, instead being launched by special blank cartridges which are loaded into a detachable box magazine.</Czech>
        <Russian>From world.guns.ru: &lt'
Unknown entity: 'C equipment, and then cause enough damage to render the target inoperative. The grenade has no propelling system in itself, instead being launched by special blank cartridges which are loaded into a detachable box magazine.</Russian>
        <Polish>From world.guns.ru: &lt'
Unknown entity: 'C equipment, and then cause enough damage to render the target inoperative. The grenade has no propelling system in itself, instead being launched by special blank cartridges which are loaded into a detachable box magazine.</Polish>
        <Hungarian>From world.guns.ru: &lt'
Unknown entity: 'C equipment, and then cause enough damage to render the target inoperative. The grenade has no propelling system in itself, instead being launched by special blank cartridges which are loaded into a detachable box magazine.</Hungarian>
    </Key>
    <Key ID="STR_VIL_AKS74UB_BS1_SHORT">
      <German>Compact assault rifle with silenced grenade launcher&lt'
Item STR_VIL_DN_BS1 listed twice
Item STR_ACTIONS_BUILD listed twice
Item STR_EQUIP_NAME_41 listed twice
Item STR_EQUIP_DESC_41 listed twice
Item str_dss_10rnd_vss listed twice
Item str_dss_20rnd_vss listed twice
Item str_dn_20rnd_9x39_sp5_vss listed twice
Item str_dn_ak_107_gl_pso listed twice
Item str_dn_ak_107_kobra listed twice
Item str_dn_M40A3 listed twice
Item str_dn_rpk_74 listed twice
Item str_ep1_dn_fn_fal listed twice
Updating base class ->Man, by vil_police\config.cpp/CfgVehicles/CAManBase/
Updating base class ->Default, by ca\weapons\config.bin/CfgMagazines/CA_Magazine/
Updating base class ->PistolCore, by ca\weapons\config.bin/cfgWeapons/Pistol/
Updating base class ->Default, by ca\weapons\config.bin/cfgWeapons/ItemCore/
Updating base class TalkTopics->TalkTopics, by ca\characters2\config.bin/CfgVehicles/SoldierWB/TalkTopics/
Updating base class ->USMC_Soldier_Base, by ca\characters2\config.bin/CfgVehicles/USMC_Soldier2/
Updating base class ->Citizen, by ca\characters2\config.bin/CfgVehicles/Citizen1/
Updating base class ->SkodaBase, by ca\wheeled\config.bin/CfgVehicles/car_sedan/
Updating base class ->House, by ca\misc3\config.bin/CfgVehicles/Land_Fire/
Updating base class ->House, by ca\misc3\config.bin/CfgVehicles/Land_A_tent/
Updating base class ->Camp_base, by ca\misc3\config.bin/CfgVehicles/ACamp/
Cannot delete class CA_DebriefingInfo, it is referenced somewhere (used as a base class probably).
Cannot delete class CA_DebriefingInfo, it is referenced somewhere (used as a base class probably).
Updating base class RscShortcutButton->RscShortcutButtonMain, by z\addons\dayz_code\config.cpp/RscDisplayMain/controls/CA_Exit/
Updating base class RscText->, by z\addons\dayz_code\config.cpp/RscTitles/Default/
Updating base class CA_B_SAVE->RscShortcutButtonMain, by z\addons\dayz_code\config.cpp/RscDisplayMPInterrupt/controls/CA_B_Respawn/
Updating base class CA_B_SAVE->CA_B_Respawn, by z\addons\dayz_code\config.cpp/RscDisplayMPInterrupt/controls/CA_B_Options/
Updating base class CA_B_SAVE->CA_B_Options, by z\addons\dayz_code\config.cpp/RscDisplayMPInterrupt/controls/CA_B_Abort/
Cannot delete class MainTree, it is referenced somewhere (used as a base class probably).
Updating base class USMC_Soldier2->Survivor2_DZ, by z\addons\dayz_code\config.cpp/CfgVehicles/sah_civilian1_pants/
Updating base class BAF_Soldier_MG_MTP->Banned, by dayz_anim\config.cpp/CfgVehicles/BAF_Soldier_MG_DDPM/
Updating base class BAF_Soldier_base_EP1->Banned, by dayz_anim\config.cpp/CfgVehicles/BAF_Soldier_AT_MTP/
Updating base class BAF_Soldier_AT_MTP->Banned, by dayz_anim\config.cpp/CfgVehicles/BAF_Soldier_AT_DDPM/
Updating base class BAF_Soldier_base_EP1->Banned, by dayz_anim\config.cpp/CfgVehicles/BAF_Soldier_HAT_MTP/
Updating base class BAF_Soldier_HAT_MTP->Banned, by dayz_anim\config.cpp/CfgVehicles/BAF_Soldier_HAT_DDPM//BMP2_HQ_TK_EP1/
Updating base class BAF_FV510_D->Banned, by dayz_anim\config.cpp/CfgVehicles/BAF_FV510_W/
Warning: no type entry inside class RscDisplayStart/controls/Text
Warning: no type entry inside class RscDisplayStart/controls/Progress
Warning: no type entry inside class RscDisplayStart/controls/Progress2
 
Unrecognized CfgVehicles simulation  in bin\config.bin/CfgVehicles/C130J/
/

Srry for the huge copy paste :) Ty in advanced
 
Back
Top