Mysql to postgres Migration pgloader "ERROR mysql: 76 fell through ECASE expression"

2k Views Asked by At

While I try to migrate my MySQL Databse to a Postgres database.

I Face the Following Error.

How can I solve this?

enter image description here

3

There are 3 best solutions below

0
Edward van Kuik On

I solved it by compiling pgloader from source.

2
starball On

You may find the solution found by user Axxxolotl in this GitHub issue comment useful:

apt remove pgloader -y
git clone https://github.com/dimitri/pgloader.git
apt-get install sbcl unzip libsqlite3-dev make curl gawk freetds-dev libzip-dev
cd /path/to/pgloader
make pgloader
./build/bin/pgloader --help
pgloader --debug mysql://root:'123'@127.0.0.1/nextcloud_storage postgresql://postgres:[email protected]:5432/nextcloud_storage

You might need to replace the beginning of that last line with ./build/bin/pgloader instead of pgloader. Either that, or run make install or similar.

0
Nishit Singh On

After completing above steps provided by @starball, if you're facing Command 'pgloader' not found add ./build/bin/pgloader in the last step. So final steps should look something like-

apt remove pgloader -y
git clone https://github.com/dimitri/pgloader.git
apt-get install sbcl unzip libsqlite3-dev make curl gawk freetds-dev libzip-dev
cd pgloader
make pgloader
./build/bin/pgloader --help
./build/bin/pgloader mysql://root:'123'@127.0.0.1/nextcloud_storage postgresql://postgres:[email protected]:5432/nextcloud_storage