DarkRP transfer data to MySQL

Hi, I’m considering using a MySQL database on our DarkRP server, but that will result in all players having a money reset…
Is there any way of avoiding this when hooking it up to the database m? As I don’t see a place where all the money is stored in DarkRP ( assuming it’s a table )
Thanks :slight_smile:

You should be able to

  1. Download your server’s sv.db file
  2. Open it using an SQLite Explorer
  3. Export the database into a file
  4. Import the file into your MySQL database (using PHPMyAdmin)
    I’m not so sure about the program you’ll need for the sv.db, but a bit of Googling should get you what you want.

[editline]4th May 2014[/editline]

PS: This program looks pretty good and does everything you need. Also, it looks like DarkRP player information is stored in the table “darkrp_player”.

Thanks, I’ll look into this as soon as I get home, and tell you the outcome =)

Hi, it works if I use “Export table as CSV file”, however if I wish to use the whole table and transfer it over, it gives me errors when using “database to SQLfile”

This is the error: http://puu.sh/8zdG2/dc0830c5c1.png
What I’ve checked at exporting: http://puu.sh/8zdH0/6317e7362b.png

One thing you could do, is loop through all entries in your sqlite db, and just output a phpmyadmin insert-backup.

There are two ways to insert; you can use a Values insert, or a Set insert: https://dl.dropboxusercontent.com/u/26074909/tutoring/database/basic_queries_and_query_formats_used_to_check_for_existing_row.lua.html

So, I’d recommend just doing a select query on the sqlite db, output in the format of SQL insert, then run the output in phpmyadmin.

Maybe try fiddling around with the SQL compatibility modes, or just remove that line from the file (BEGIN TRANSACTION), since it seems it’s no longer supported.

How can I read the file?

@Acecool, that seems a bit to complicated for me… :suicide:

You have generated a file, right? All you would need to do is open it in a text editor, it’s just text. A massive string of queries.

Yeah, I just removed that first line, but now I’m having all this when transfering: http://puu.sh/8zeIi/00b0137a2a.png

Did you create a database first? Make one, select it in the side bar then navigate to the SQL upload through the above tabs.

http://puu.sh/8zfBW/f23a453293.png
Yeah, I have a database called darkrp

Do you mind sending me the file via pastebin? I’ll see if I can sort this out.

Ugh I’m really sorry, but I’m not at my computer any longer.
Do you mind if I PM it to you tomorrow?

I don’t think I’ll be available, but you may want to try this if you don’t have any luck.

Alright thanks I’ll try that tomorrow.
I will however, if it doesn’t work, send the file to you, so you can look at it whenever the time fits you ( if you want to, not forcing you ).