Skip to content

Import the discogs.com monthly XML dumps into MySQL database

Notifications You must be signed in to change notification settings

DIKIIDM/discogsXMLToMySql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is it?

This is java program for importing the discogs data dumps to mySql database.

Options

  • input: -f / --pathToXMLFolder = path to the directory, containing XML files;
  • input: -p / --databaseUserPassword = database user password;
  • input: -u / --databaseUsername = database username;
  • input: -url / --databaseURL = database url.

Examples

java -jar discogsXMLToMySql.jar -f C:\discogs -u root -p root -url "jdbc:mysql://localhost/discogs"
java -jar discogsXMLToMySql.jar -f C:\discogs -u root -p root -url "jdbc:mysql://localhost/discogs?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&serverTimezone=UTC&rewriteBatchedStatements=true"

How to use it?

Steps to import the data-dumps into mySql:

  1. download the discogs data dumps from http://www.discogs.com/data/;
  2. unzip the dumps to some directory;
  3. import the database schema by executiong discogs_schema.sql:
    mysql -u root -p
    create database discogs;
    use discogs;
    source /path/to/discogs_schema.sql;
  4. execute jar file:
    java -jar discogsXMLToMySql.jar -f /path/to/xml/directory -u 'db username' -p 'db user password' -url "jdbc:mysql://localhost/discogs"

Schema

diagram

About

Import the discogs.com monthly XML dumps into MySQL database

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published