[SOLVED] access to the database ?

bossdu15000

New Member
Hello
now I have just one question, where is located the access sql scripts a database?

To be more clear the server adds vehicles to the database on the map I'm looking for the script that allows this, the select and the while.
the person who knows PHP knows what is the select and the while.

example:
Select * from character_data

because I searched everywhere and I found just in the .bat:
MySQL.exe - user = *-password = *-host = 127.0.0.1 - port = 3306 database = hivemind - execute = "call pMain (1)"

helped me to it you please

I speak french, this text was done by bing translator.
 
Last edited:
I dont know what you realy want. But you can create a new function with your settings and run it with the batch.

function pRestart

MYSQL.exe -u root -ppassword -host=127.0.0.1 -port=3306 yourdatabase -e "call pRestart"

when you want a simple respawn, look in your pMain function on the Server.
 
I belive you may be after this, this located in HiveEXT.ini
Code:
;If using OFFICIAL hive, the rest of the settings in this section have no effect
Host = 127.0.0.1

;The default is MySql, which is better supported than Postgre (completely untested)
Type = MySql

;Port to connect to. The default is the default listening port of a server of the selected Type
;Instead of specifying Port, you can specify Socket and set Value to the socket name
Port = 3306

;Database name to connect to (you must supply this if private).
Database = hivemind

;Username to connect with
Username = dayz
;Password to authenticate with (default is blank)
Password = dayz
this where you set how dayz connects to the MYSQL server

to excute a SQL file on your server db do it like so (very rough but does what i need)

i run this in a cmd file
Code:
cd C:\xampp\mysql\bin\

mysql -u dayz -p  -D dayz_epoch -i < NAMEOFSQLFILE.sql
PAUSE
save as FILENAME.cmd

NOTE:
Sql file MUST be in same location as C:\xampp\mysql\bin\
eg: C:\xampp\mysql\bin\NAMEOFSQLFILE.sql


the SQL file (for deleting character DB)

CAUTION!!!
this willreset the character DB table to blank!

Code:
TRUNCATE TABLE `character_data`;


you can call any SQL command in the file

hope this helps a bit
 
I already know all that, this is not what I am looking for.

When you start the server, and that the first player connects a hiveExt window opens and it spawn objects (cars, items,...).

I'm looking for the script in c, c++, c#, java, or another language, that connects the database and retrieves the data (x, y, z,...) of objects (cars, items,...) and the spawn on the map.

normally part of the script that interests me will be this piece of code:

SELECT * FROM object_spawns

Thank you
 
Last edited:
Back
Top