Daily Weekly Monthly

Daily Shaarli

All links of one day in a single page.

February 25, 2019

the4thdoctor/pg_chameleon: MySQL to PostgreSQL replica system

pg_chameleon is a MySQL to PostgreSQL replica system written in Python 3. The system use the library mysql-replication to pull the row images from MySQL which are stored into PostgreSQL as JSONB. A pl/pgsql function decodes the jsonb values and replays the changes against the PostgreSQL database.

pg_chameleon 2.0 is available on pypi

Creating user, database and adding access on PostgreSQL

sudo -u postgres psql
postgres=# create database mydb;
postgres=# create user myuser with encrypted password 'mypass';
postgres=# grant all privileges on database mydb to myuser;