PDA

View Full Version : Migrate clientprefs to msyql


Chdata
10-15-2014, 22:42
Right now my clientprefs are on a server per server basis. I want to change it so there's one database for all of my servers (which I'll be grabbing from one of my servers).

1. Where or how do I even access the clientprefs database stored in localhost or whatever?
2. How can I import/export that file?

Beyond that I can use phpmyadmin to make the database and set up my database.cfg file.

splewis
10-16-2014, 01:21
I believe the data is stored in: addons/sourcemod/data/sqlite

Chdata
10-16-2014, 02:14
Alright. I see clientprefs-sqlite.sq3 there, and a SERVERNAME_clientprefs.sq3 which I presume is a database I made in nfoserver's control panel or something... not sure exactly.

I assume clientprefs-sqlite is the one sourcemod servers default to using?

WildCard65
10-16-2014, 09:08
Alright. I see clientprefs-sqlite.sq3 there, and a SERVERNAME_clientprefs.sq3 which I presume is a database I made in nfoserver's control panel or something... not sure exactly.

I assume clientprefs-sqlite is the one sourcemod servers default to using?

doesn't clientprefs default to sql-lite if no database.conf info is set?
Edit: Yes, clientprefs uses the following entries(in order of what it looks for first): clientprefs, default, storage-local

Powerlord
10-16-2014, 16:32
doesn't clientprefs default to sql-lite if no database.conf info is set?
Edit: Yes, clientprefs uses the following entries(in order of what it looks for first): clientprefs, default, storage-local

Not really a surprise. storage-local was added iirc to make sure clientprefs worked even if default wasn't set.

loki15
04-30-2015, 08:12
Hi, trying to import the database clientprefs-sqlite.sq3 via phpMyadmin but I receive the error,
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SQLite format 3' at line 1
what it means and how I normally import my database?

WildCard65
04-30-2015, 09:44
You don't import the sql-lite database. ClientPrefs creates the tables it needs. https://github.com/alliedmodders/sourcemod/blob/master/extensions/clientprefs/extension.cpp#L217

friagram
05-02-2015, 13:48
You can dump a sqlite database to a mysql format file, and then import it