Jump to content
Sign in to follow this  
firefly2442

Arma2MySQL

Recommended Posts

Yep that should be fine, however remember weapons and magazine slot positions/limitations and if it's ACE, weight restrictions and ace backpack capacity. The current UCP uses a global xml file which contains all these values which the jquery script reads and uses.

Share this post


Link to post
Share on other sites

Ok I admit Im not greatly knowledgeable on SQL but seem to be having an issue as it doesnt seem the scripts even attempt to run in the example mission

I have set up an MySQL server put the info into the database file.. transferred the mission into my MPmissions folder and started it

so its not on a dedicated server(which may be the problem) but testing it out before throwing it on a dedi server

but when the mission loads nothing appears to start related to the arma2sql either in game or the rpt file

Share this post


Link to post
Share on other sites

What about @JayArma2Lib modfolder, did you install and enable it?

Share this post


Link to post
Share on other sites

@Charles Darwin. The PDB scripts will only run when the mission is hosted from a dedicated server, the scripts will bypass on the client if you do not hence the issue that you are experiencing.

Run the Arma2SQL.CLI.exe on the server and make sure that the arma2oaserver.exe is running JayArma2Lib and CBA addons. CBA is needed on the server since the serverside PDB scripts call some of the CBA functions but you'll need it anyway since the example mission uses ACE.

The example mission also requires that ACE is running on client as well as server. The client need not run JayArma2Lib and only needs to run CBA if it's an ACE mission (like the example). The client PDB scripts do not call any CBA functions, thus there are no client addon dependencies for PDB.

To setup PDB in a non ACE mission just open the pdbSetup.sqf and disable ACE support with the line: pdb_ace_enabled = false;

Apologies for the fact that there is little or no documentation at the moment, that will change in time.

I have removed the download archive from the files tab in the Dev Heaven project as the download was out of date. The files are now only available from the .git repository here

Edited by [KH]Jman

Share this post


Link to post
Share on other sites

NP ^^ from looking at the code I was pretty sure that was the issue just wanted to make sure it was that and not having to do with my limited SQL knowledge though from what I have seen thus far its fairly simple to understand. thanks for the reply :) Also as far as the SQL procedures is there anything that is required to run the PDB?

*goes to fire up a dedi server*

Edited by Charles Darwin

Share this post


Link to post
Share on other sites

Im not real familiar with git repositories and cant seem to get the new files? sorry for being a pain in the butt lol In exchange for helping me to figure things out Ill write a quick start guide if thats ok with you guys

using old files you had for direct download, this is the error i get

pdberror.jpg

Edited by Charles Darwin

Share this post


Link to post
Share on other sites

It looks like we don't have anonymous read access enabled via Git. I have asked Sickboy to enable it. Once that's done you can take the following steps:

The old ones are well, old, so I would suggest using the new ones. :)

Download git:

http://git-scm.com/

Create a new folder on your desktop or wherever you want to save this. Right click on the folder and choose "Git bash here". This should bring up the command window. Then type:

git clone git://git.dev-heaven.net/a2-sql-persistent-db.git

Now you should have the new files. Then, if we change anything, all you have to do is type:

git pull origin master

And it will update accordingly. Since this is still "in progress", there's really no point in releasing downloads yet. HTH. :)

Share this post


Link to post
Share on other sites

oh ok thats probably the issue with why i was having issues thank you sir ;)

and no i get the idea of using GIT, just wanted to make sure that since I am basically beta testing that I have the most up to date files

thanks again for taking the time to help me :)

Share this post


Link to post
Share on other sites

Fixed problem where idle mysql connection would die. Will push new executable to PDB after I check on another bug.

Share this post


Link to post
Share on other sites

awesome, this is a really awesome tool you guys are working on, I wish I knew more about programming to be able to help, but like I said as soon as I figure out how to use it, Ill put up a quick start guide:D

git bash connection is still being hung up i assume that mean the read only is still not working

Share this post


Link to post
Share on other sites

Thanks for the new binary Firefly, I'm running the new build on our KH public server without the scheduler restarting it every 8 hours so I'll let you know how it performs here.

Share this post


Link to post
Share on other sites

Hmmm.. Im sure this is because I have not fully grasped the concept the MySQL database program yet but this is the error I get with the new files

Info: 12:56:57 - Arma2MySQL Server Started.
Info: 12:56:57 - Started listening to pipe.
Info: 13:01:38 - Named pipe opened.
Info: 13:01:40 - Received message: arma:GetMissionByName(tna=Co30 ACE KH PDB Battlefields)
Error: 13:01:40 - ERROR: The database name passed through to the application doesn't match any in the Databases.txt file.
Info: 13:02:23 - Named pipe closed.

the database.txt

# Put each database connection you want on a separate line
# For an example, see the following
#databasename,ipaddress,port,username,password
#
#MySQL55,"localhost",3306,root,pass

and the rpt:

[6431,223.461,0,"XEH: PreInit Started. v3.3.3. MISSINIT: missionName=Co30_ACE_KH_PDB_Batfields_2_12, worldName=Chernarus, isMultiplayer=true, isServer=false, isDedicated=false"]
[6431,234.616,0,"XEH: PreInit Finished. CACHE DISABLED? (Disable caching with cba_disable_cache.pbo): SLX_XEH_RECOMPILE=false, CBA_COMPILE_RECOMPILE=false, CBA_FUNC_RECOMPILE=false"]
"JayArmA2Lib: ACTIVE"
[6431,230.673,0,"x\ace\addons\sys_wounds\XEH_preInit.sqf:8","WARNING: Enhanced Armor difficulty options enabled - this is not recommended in conjunction with ACE Wounds!"]
[6457,251.961,0,"XEH: PostInit Started"]
[6457,252.019,0,"CBA_VERSIONING: cba=0.8.3.175, ace=1.13.0.522, acex=1.13.0.353, acex_ru=1.13.0.64, acex_usnavy=1.13.0.67, "]
[6457,258.152,0,"XEH: PostInit Finished. State: _isClient=true, _isJip=false, _isDedClient=true, _isServer=false, _isDedServer=false, _playerCheckDone=true, _sp=false, _startInitDone=true, _postInitDone=true, _mpRespawn=true, _machineType=2, _sessionId=2, BIS_functions=L 1-1-I:1 REMOTE, group=L 1-1-I, player=R 1-1-A:1 (|TG-IrrP|Charles Darwin), _playerType="GUE_Soldier_CO", _playerGroup=R 1-1-A"]
["PersistentDB: pdb settings loaded"]
"############################# Co30 ACE KH PDB Battlefields #############################"
[6479,259.694,0,"CBA_VERSIONING_SERVER: cba=0.8.3.175, ace=1.13.0.522, acex=1.13.0.353, acex_ru=1.13.0.64, acex_usnavy=1.13.0.67, "]
["dynamic_weatherSync.sqf: Running"]
["dynamic_weatherSync.sqf: Syncing"]
["dynamic_weatherSync.sqf: updating setOvercast:",0.566492]
Client: Object 2:860 (type Type_149) not found.
["PersistentDB: SPAWN"]
Client: Object 2:863 (type Type_70) not found.
Client: Object 2:863 (type Type_72) not found.
["PersistentDB: PDB_FNC_SERVER_LOADERSTATUS: ","Mission: Co30 ACE KH PDB Battlefields"]
Client: Object 2:864 (type Type_70) not found.
Client: Object 2:864 (type Type_94) not found.
["PersistentDB: FINISHED MISSION INIT, time: ",4.706]

thanks again for all the help I feel like I am being a pain in the but but I hope I can repay eventually :bounce3:

Share this post


Link to post
Share on other sites

I'm waiting to test this out as well but the git is giving me fatal: The remote end hung up unexpectedly.

Share this post


Link to post
Share on other sites

@Charles Darwin.

Error: 13:01:40 - ERROR: The database name passed through to the application doesn't match any in the Databases.txt file.

You need to actually define a database config in the database.txt file. # means the lines are rem'd out!.

For example:

# Put each database connection you want on a separate line
# For an example, see the following
#databasename,ipaddress,port,username,password
#
#arma,127.0.0.1,3306,armausername,secret

thisismydatabasename,127.0.0.1,3306,thisismyusername,thisismypassword

@Kolmain.

The git repository seems fine to me. Try a different git client like:

http://sourceforge.net/projects/gitextensions

http://code.google.com/p/tortoisegit

Edited by [KH]Jman

Share this post


Link to post
Share on other sites

DOH! I can't beleive I didn't see that LOL thanks * shy's away for being stupid*

kolmain..in order to get the git files I had to use the gitbash and this link: https://USERNAME:PASSWORD@git.dev-heaven.net/a2-sql-persistent-db.git

Jman: ok ran your arma.sql file into a new DB and created the needed tables etc and the ArmA2MySQL program is running and connected to the DB..load the mission named pipe is opened and get:

Info: 15:29:36 - Arma2MySQL Server Started.
Info: 15:29:36 - Database: arma IPAddress: localhost Port: 3306 Username: root Password: NotShownForSecurityReasons
Info: 15:29:36 - Started listening to pipe.
Info: 15:34:14 - Named pipe opened.
Info: 15:34:15 - Received message: arma:GetMissionByName(tna=Co30 ACE KH PDB Battlefields)
Warning: 15:34:15 - MySQL error. MySql.Data.MySqlClient.MySqlException (0x80004005): Procedure or function '`GetMissionByName`' cannot be found in database '`arma`'.
  at MySql.Data.MySqlClient.ProcedureCache.GetProcData(MySqlConnection connection, String spName)
  at MySql.Data.MySqlClient.ProcedureCache.AddNew(MySqlConnection connection, String spName)
  at MySql.Data.MySqlClient.ProcedureCache.GetProcedure(MySqlConnection conn, String spName, String cacheKey)
  at MySql.Data.MySqlClient.StoredProcedure.GetParameters(String procName, DataTable& proceduresTable, DataTable& parametersTable)
  at MySql.Data.MySqlClient.StoredProcedure.CheckParameters(String spName)
  at MySql.Data.MySqlClient.StoredProcedure.Resolve(Boolean preparing)
  at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
  at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader()
  at Arma2SQL.MySQLProvider.MySQLProvider.<RunProcedure>d__0.MoveNext()
Info: 15:34:15 - Trying to write: arma:GetMissionByName(tna=Co30 ACE KH PDB Battlefields)false;
Info: 15:34:15 - Named pipe closed.
Info: 15:34:37 - Named pipe opened.
Info: 15:34:37 - Received message: arma:UpdatePlayer(tsc=0,tpos=2194.36|9603.84|245.678,tdam=0,tdhe=0,tdbo=0,tdha=0,tdle=0,tdir=337.231,tsta=Stand,tsid=,tveh=,tsea=,tpid=2335878,tna=|TG-IrrP|Charles Darwin,tmid=<null>)
Warning: 15:34:37 - MySQL error. MySql.Data.MySqlClient.MySqlException (0x80004005): Procedure or function '`UpdatePlayer`' cannot be found in database '`arma`'.
  at MySql.Data.MySqlClient.ProcedureCache.GetProcData(MySqlConnection connection, String spName)
  at MySql.Data.MySqlClient.ProcedureCache.AddNew(MySqlConnection connection, String spName)
  at MySql.Data.MySqlClient.ProcedureCache.GetProcedure(MySqlConnection conn, String spName, String cacheKey)
  at MySql.Data.MySqlClient.StoredProcedure.GetParameters(String procName, DataTable& proceduresTable, DataTable& parametersTable)
  at MySql.Data.MySqlClient.StoredProcedure.CheckParameters(String spName)
  at MySql.Data.MySqlClient.StoredProcedure.Resolve(Boolean preparing)
  at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
  at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader()
  at Arma2SQL.MySQLProvider.MySQLProvider.<RunProcedure>d__0.MoveNext()
Info: 15:34:37 - Trying to write: arma:UpdatePlayer(tsc=0,tpos=2194.36|9603.84|245.678,tdam=0,tdhe=0,tdbo=0,tdha=0,tdle=0,tdir=337.231,tsta=Stand,tsid=,tveh=,tsea=,tpid=2335878,tna=|TG-IrrP|Charles Darwin,tmid=<null>)false;
Info: 15:34:37 - Received message: arma:UpdatePlayerWeapons(twea="AKS_74_U"|"Binocular"|"ItemCompass"|"ItemWatch"|"ACE_Map"|"ACRE_PRC343_ID_1",tmag="30Rnd_545x39_AK"|"30Rnd_545x39_AK"|"30Rnd_545x39_AK"|"30Rnd_545x39_AK"|"30Rnd_545x39_AK"|"30Rnd_545x39_AK"|"HandGrenade_East"|"HandGrenade_East"|"SmokeShell"|"SmokeShell"|"ACE_Bandage"|"ACE_Bandage",tpid=2335878,tna=|TG-IrrP|Charles Darwin,tmid=<null>)
Warning: 15:34:37 - MySQL error. MySql.Data.MySqlClient.MySqlException (0x80004005): Procedure or function '`UpdatePlayerWeapons`' cannot be found in database '`arma`'.
  at MySql.Data.MySqlClient.ProcedureCache.GetProcData(MySqlConnection connection, String spName)
  at MySql.Data.MySqlClient.ProcedureCache.AddNew(MySqlConnection connection, String spName)
  at MySql.Data.MySqlClient.ProcedureCache.GetProcedure(MySqlConnection conn, String spName, String cacheKey)
  at MySql.Data.MySqlClient.StoredProcedure.GetParameters(String procName, DataTable& proceduresTable, DataTable& parametersTable)
  at MySql.Data.MySqlClient.StoredProcedure.CheckParameters(String spName)
  at MySql.Data.MySqlClient.StoredProcedure.Resolve(Boolean preparing)
  at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
  at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader()
  at Arma2SQL.MySQLProvider.MySQLProvider.<RunProcedure>d__0.MoveNext()
Info: 15:34:37 - Trying to write: arma:UpdatePlayerWeapons(twea="AKS_74_U"|"Binocular"|"ItemCompass"|"ItemWatch"|"ACE_Map"|"ACRE_PRC343_ID_1",tmag="30Rnd_545x39_AK"|"30Rnd_545x39_AK"|"30Rnd_545x39_AK"|"30Rnd_545x39_AK"|"30Rnd_545x39_AK"|"30Rnd_545x39_AK"|"HandGrenade_East"|"HandGrenade_East"|"SmokeShell"|"SmokeShell"|"ACE_Bandage"|"ACE_Bandage",tpid=2335878,tna=|TG-IrrP|Charles Darwin,tmid=<null>)false;
Info: 15:34:37 - Received message: arma:UpdatePlayerACE(tawb=,taw=,tarm=,tpid=2335878,tna=|TG-IrrP|Charles Darwin,tmid=<null>)
Warning: 15:34:37 - MySQL error. MySql.Data.MySqlClient.MySqlException (0x80004005): Procedure or function '`UpdatePlayerACE`' cannot be found in database '`arma`'.
  at MySql.Data.MySqlClient.ProcedureCache.GetProcData(MySqlConnection connection, String spName)
  at MySql.Data.MySqlClient.ProcedureCache.AddNew(MySqlConnection connection, String spName)
  at MySql.Data.MySqlClient.ProcedureCache.GetProcedure(MySqlConnection conn, String spName, String cacheKey)
  at MySql.Data.MySqlClient.StoredProcedure.GetParameters(String procName, DataTable& proceduresTable, DataTable& parametersTable)
  at MySql.Data.MySqlClient.StoredProcedure.CheckParameters(String spName)
  at MySql.Data.MySqlClient.StoredProcedure.Resolve(Boolean preparing)
  at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
  at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader()
  at Arma2SQL.MySQLProvider.MySQLProvider.<RunProcedure>d__0.MoveNext()
Info: 15:34:37 - Trying to write: arma:UpdatePlayerACE(tawb=,taw=,tarm=,tpid=2335878,tna=|TG-IrrP|Charles Darwin,tmid=<null>)false;
Info: 15:34:37 - Named pipe closed.

Im guessing there are SQL procedures needed in the DB that arent in that file?:confused: seems like everything is in there based on whats in the SQF files and my limited knowledge of SQL but Im so confused by all of this I have no real clue lol

On the bright side...were at least connected now lol!

Edited by Charles Darwin

Share this post


Link to post
Share on other sites

I believe the procedures that are in the .SQL file are setup for a MySQL user called "arma". I would create a new user called "arma" through phpmyadmin or something similar and then rerun the .SQL file through when you are logged in as that user.

Just as a side note to anyone: Please do not use the root user for MySQL. This is a bad idea. It's much better and safer to create a new user and restrict the privileges to one database. I'm not responsible for tears if someone runs a delete command. ;)

Share this post


Link to post
Share on other sites

WOOOHOOO!!! got it working..Ill get to writing that quick start guide tomorrow..do you want me to post it here or do you want to look it over first? Don't want to put something out there that might be confused as having your guy's approval especially since I'm not nearly as good at this stuff as you, I'm just excited to get more attention for this project as I see what it can do!

Share this post


Link to post
Share on other sites

Glad you got it working!. Sure email it over to me and I'll proof read it first if you prefer ;)

---------- Post added at 11:18 AM ---------- Previous post was at 10:00 AM ----------

New binary build on Git. Once this is sorted, give it a try if you would. Cheers.

@ Firefly

Issue is still occuring.

https://dev-heaven.net/issues/25940#note-6

Share this post


Link to post
Share on other sites

Pushed small update to repo

Scripts exit correctly on DB retry fail.

- Updated initPlayerConnection.sqf

- Updated playerDisconnected.sqf

- Updated system.sqf

- Removed connectionError.sqf

- Added clientConnectionError.sqf

- Added serverConnectionError.sqf

- Updated example mission folder

Edited by [KH]Jman

Share this post


Link to post
Share on other sites

@Charles Darwin;

do you have anything like STEAM that I can get in touch with you on?

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
Sign in to follow this  

×