MySQL to PostgreSQL migration

Install migration Ruby gem and run it:

gem install mysql2psql
mysql2psql

Update database credentials in generated mysql2psql.yml file:

mysql:
  database: redmine
  hostname: localhost
  port: 3306
  username: redmine
  password: xxxxxxx
  encoding: utf8

destination:
 # if file is given, output goes to file, else postgres
 file: /tmp/redmine-pg.sql
 postgres:
  hostname: localhost
  port: 5432
  username: mysql2psql
  password:
  database: mysql2psql_test

Run command again:

mysql2psql

Links:

Tags:
comments powered by Disqus