This is java program for importing the discogs data dumps to mySql database.
- 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.
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"
Steps to import the data-dumps into mySql:
- download the discogs data dumps from http://www.discogs.com/data/;
- unzip the dumps to some directory;
- import the database schema by executiong discogs_schema.sql:
mysql -u root -p
create database discogs;
use discogs;
source /path/to/discogs_schema.sql;
- execute jar file:
java -jar discogsXMLToMySql.jar -f /path/to/xml/directory -u 'db username' -p 'db user password' -url "jdbc:mysql://localhost/discogs"