Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

mysql2postgresql

> 数据库
Open source

Convert MySQL XML dumps into PostgreSQL schema + data SQL.

316 stars0 likes0 views
WebsiteGitHub

About

Convert MySQL XML dumps into PostgreSQL schema + data SQL.

mysql2postgresql

Converter mysql schema and data to postgresql

Usage

  1. Create dump in xml format using command: mysqldump --xml -u USER_NAME DB_NAME > DUMP_FILE_NAME
  2. Run converter using command: php convertor.php -i DUMP_FILE_NAME -o PSQL_FILE_NAME

Additional options

  • -b50 - set batch count (used on insert data). By default batch count = 200
  • -n - non export structure

Restriction

This converter does not support foreign keys, because mysql does not return foreign key in xml dump Also You must have installed locally php postgresql extension

Issues· 4 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

PHPconverterdatabasemigrationmysql

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库