# pg2mysql **Repository Path**: mirrors_vmware-archive/pg2mysql ## Basic Information - **Project Name**: pg2mysql - **Description**: Tool for safely migrating from PostgreSQL to MySQL - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-03-25 - **Last Updated**: 2025-09-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # pg2mysql `pg2mysql` was created to facilitate migrating data from PostgreSQL to MySQL given mostly equivalent schemas. In PostgreSQL it is common to use the `text` datatype for character data, which the [PostgreSQL documentation](https://www.postgresql.org/docs/9.1/static/datatype-character.html) describes as having effectively no limit. In MySQL this is not the case, as the datatype with the same name (`text`) is limited to 65535, and the more common datatype, `varchar`, is defined with an explicit limit (e.g. `varchar(255)`). This means that, given a column with `text` datatype in PostgreSQL, there must be enough room in the equivalent MySQL column for the data in PostgreSQL to be safely migrated over. This tool can be used to validate the target MySQL schema against a populated PostgreSQL database and, provided the data in the PostgreSQL database is compatible, the migration to move the data from PostgreSQL to MySQL. ## Install from source ``` go get github.com/pivotal-cf/pg2mysql/cmd/pg2mysql ``` ## Usage Create a config: ``` $ cat > config.yml <