This is an old revision of the document!

Using a shared Database

ComicRack 1.64 and up support putting your library into a shared SQL server. For now only the book information is stored in the SQL server. Smartlists and configurations are stored in the local user profile.

NOTE: This is an experimental and advanced feature and requires some knowledge on how to setup SQL servers.


MySQL and Microsoft SQL servers are currently supported.

What is the advantage

ComicRack by default stores the database into a local file named 'ComicDb.xml'. This file is loaded when starting up, and regularly saved in the background when data changes. This means that it is possible to lose data when your system fails, as the saving is not done immediately after changes to the data occur. Also it is not possible to share this database with other users. Every user (on the same system or network) has to maintain his/her own database. Using a shared database solves all these problems. Users can share a library and changes get saved to the database immediately.

Setting up your SQL server

As always, before playing around: MAKE A BACKUP OF COMICDB.XML!

You need to create an empty database with full access rights on your server. Usually you would create a new user (let's say comicrack) and a new database on your server (let's say comicdb).


For mysql, considering the address where you have comicrack running, you could do the following to set up the database and user. Bold shows commands you have to type:

mysql -u root -p

Enter password:

(type the root user password for mysql)

mysql> CREATE DATABASE 'comicdb';

Query OK, 1 row affected (0.00 sec)


Query OK, 0 rows affected (0.00 sec)

mysql> GRANT USAGE ON *.* to 'comicrack'@'' IDENTIFIED BY 'PASSWORD';

Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON comicdb.* TO 'comicrack'@'';

Query OK, 0 rows affected (0.00 sec)

mysql> exit


On comicrack.ini, you should then add:

DataSource=mysql:Server=; Uid=comicrack; Pwd=PASSWORD; Database=comicdb;

where is the address of the server running mysql.

Follow the the handbooks for your server type to accomplish this.

Telling ComicRack to use your new Database

If you use MySQL add the following line to your comicrack.ini file

DataSource=mysql:Server=your_server; Uid=your_user; Pwd=your_user_password; Database=your_database_name;

Should you use a Microsoft SQL server (this sample uses integrated security)

DataSource=mssql:Data Source=your_data_source; Initial Catalog=your_catalog_name; Integrated Security=True

The first time you start ComicRack with these new settings ComicRack will create the structure in the database, copy all your local entries to the database (this can take some time) and delete your local database.