• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to convert MySQL 8.2 to PostreSQL 16 in Windows (10)?

 
Ranch Hand
Posts: 194
  • Number of slices to send:
    Optional 'thank-you' note:
Hi,

I am a novice at dealing with databases and am trying to convert my MySQL (8.2) to PostreSQL (16). I have read volumes on the subject and most of it went over the top of my head. It seems the easiest way is to use pgloader. However, I cannot find any documentation on how to install it on Windows (10). In the documentation (https://pgloader.readthedocs.io/en/latest/install.html) it states that it is possible; however, does not explain how.

Does anyone have a simple step by step explanation of how to install pgloader on Windows (10) and then use it to convert a MySQL (8.2) to PostreSQL (16) please? Especially being very explicit when detailing any command line that is required.

Kind regards,

Glyn

p.s., Why do I want to do this. First, I am being pressure by an Oracle salesman to change to the enterprise version. So, I am afraid that I am going to end up with an expense I cannot afford. Second, I am being advised that PostreSQL is a superior database.
 
Marshal
Posts: 4525
572
  • 1
  • Number of slices to send:
    Optional 'thank-you' note:

Glyndwr Bartlett wrote:... Why do I want to do this. First, I am being pressure by an Oracle salesman to change to the enterprise version.


If you are switching because of licensing or commercial reasons, you might want to consider MariaDB.  It is a fork of MySQL, and should be compatible in most respects.
 
Glyndwr Bartlett
Ranch Hand
Posts: 194
  • Number of slices to send:
    Optional 'thank-you' note:
Thank you Ron. That may be my second option if I can not get the PosteSQL to work.

Kind regards,

Glyn
 
Saloon Keeper
Posts: 10779
86
  • 1
  • Number of slices to send:
    Optional 'thank-you' note:
I think you mean "PostgreSQL".
Every database has something that it does better than others. If you've been happy with MySQL I'd go with MariaDB - little to no modifications required.
 
Glyndwr Bartlett
Ranch Hand
Posts: 194
  • Number of slices to send:
    Optional 'thank-you' note:
Thank you Carey.
 
Saloon Keeper
Posts: 27851
196
  • Number of slices to send:
    Optional 'thank-you' note:
I second MariaDB. A mysqldump of the MySQL database can be directly streamed in to the Mariabd desktop client (whose name is "mysql" ) And you'll never again have to deal with Oracle salespeople or surprise license audits.

As i mentioned elsewhere, mariadb is part of the standard package repository set in most Linux distros, should be available via MacOS brew and is downloadable for Windows.

If you actually want to migrate to PostgreSQL, a mysqldump would also be the first possible step, but there are 2 caveats. First, the "SQL Standard" isn't 100% standard, so you might have to iron out some quirks. Secondly, one or the other of those databases (I forget which) likes to dump in a special bulk-load SQL insert which is not standard SQL at all and will likely give the receiver indigestion.

An alternate approach is to use an ETL utility such as Pentaho DI (Kettle), which can extract, transform and load data from/to any JDBC source as well as a large number of alternative places, including spreadsheets, text files, Amazon S3 and more. If you have an Oracle (non-MySQL) database and the Oracle sales team gets too annoying, you can use this to move your Oracle database to PostgreSQL, which is in many ways quite similar to Oracle, although in their case it's more of from a common distant ancestor than PostgreSQL being an actual clone or fork of Oracle.

 
Glyndwr Bartlett
Ranch Hand
Posts: 194
  • Number of slices to send:
    Optional 'thank-you' note:
Thank you Tim.
 
Glyndwr Bartlett
Ranch Hand
Posts: 194
  • Number of slices to send:
    Optional 'thank-you' note:
Does anyone have a simple step by step explanation of how to install pgloader on Windows (10) and then use it to convert a MySQL (8.2) to PostreSQL (16) please? Especially being very explicit when detailing any command line that is required.
 
Tim Holloway
Saloon Keeper
Posts: 27851
196
  • Number of slices to send:
    Optional 'thank-you' note:

Glyndwr Bartlett wrote:Does anyone have a simple step by step explanation of how to install pgloader on Windows (10) and then use it to convert a MySQL (8.2) to PostreSQL (16) please? Especially being very explicit when detailing any command line that is required.



The pgloader utility is designed as a native Linux app. It looks like the only "easy" way to run it on Windows is under WSL (Windows System for Linux). But see: https://github.com/dimitri/pgloader/issues/652

The pgloader utility looks convenient because it can automatically handle an entire database, but apparently it's only able to make a best approximation due to some of the differences between MySQL and PostgreSQL. In that respect, an ETL tool might work better if you're looking for continous integration (as opposed to a 1-shot move). ETL tools can smooth out the warts as part of the Transform part of ETL.

But for minimal effort, just move to MariaDB. Since it's MySQL but open-source, you'll have virtually no problems just dumping and loading directly and no longer can Oracle harass you once you're on MariaDB. https://mariadb.com/kb/en/installing-mariadb-msi-packages-on-windows/
 
Carey Brown
Saloon Keeper
Posts: 10779
86
  • Number of slices to send:
    Optional 'thank-you' note:
With MariaDB being the obvious choice why are you fixated on PostgreSQL?
 
Glyndwr Bartlett
Ranch Hand
Posts: 194
  • Number of slices to send:
    Optional 'thank-you' note:
Hi Tim,

Thank you. I just read about WSL (Windows System for Linux) yesterday. Looks like it is worth trying out.


Hi Casey,

A friend of mine waxes lyrically about it so I though I would give it a go. In my research it does seem like a better database.

Kind regards,

Glyn
 
Tim Holloway
Saloon Keeper
Posts: 27851
196
  • Number of slices to send:
    Optional 'thank-you' note:
At one time, MySQL was "incomplete", and PostgreSQL was the definite winner if you needed full Enterprise capability. When I first encountered MySQL, it couldn't even handle transaction.

But MySQL is quite mature now and supports just about anything the average user needs, including replication. As far as I know, the WikiPedia is backed by MySQL, as are countless wordpress sites. So is my recipe manager Spring Boot app these days.

Given that, though, a well-grounded developer would be well-served by knowing both MySQL and PostgreSQL. And, for that matter, SQLite, which is used for really light stuff and is the database that comes with Android.

Given a preference, I do prefer PostgreSQL, but I'm not dogmatic about it. It's just personal bias and shouldn't be taken to mean that I think less of MySQL/MariaDB.

Rather than migrate a complex database, you might just want to install PostgreSQL and build some experimental stuff from scratch just to get familiar with it.

PostgreSQL and MySQL/MariaDB can run concurrently on the same machine, by the way. They use different TCP/IP ports.
 
Glyndwr Bartlett
Ranch Hand
Posts: 194
  • Number of slices to send:
    Optional 'thank-you' note:
Hi Tim,

Exceedingly well explained! I think it most prudent to take everyone's advice and move my existing project to MariaDB and consider PostreSQL for future projects.

Kind regards,

Glyn
 
reply
    Bookmark Topic Watch Topic
  • New Topic
vceplus-200-125    | boson-200-125    | training-cissp    | actualtests-cissp    | techexams-cissp    | gratisexams-300-075    | pearsonitcertification-210-260    | examsboost-210-260    | examsforall-210-260    | dumps4free-210-260    | reddit-210-260    | cisexams-352-001    | itexamfox-352-001    | passguaranteed-352-001    | passeasily-352-001    | freeccnastudyguide-200-120    | gocertify-200-120    | passcerty-200-120    | certifyguide-70-980    | dumpscollection-70-980    | examcollection-70-534    | cbtnuggets-210-065    | examfiles-400-051    | passitdump-400-051    | pearsonitcertification-70-462    | anderseide-70-347    | thomas-70-533    | research-1V0-605    | topix-102-400    | certdepot-EX200    | pearsonit-640-916    | itproguru-70-533    | reddit-100-105    | channel9-70-346    | anderseide-70-346    | theiia-IIA-CIA-PART3    | certificationHP-hp0-s41    | pearsonitcertification-640-916    | anderMicrosoft-70-534    | cathMicrosoft-70-462    | examcollection-cca-500    | techexams-gcih    | mslearn-70-346    | measureup-70-486    | pass4sure-hp0-s41    | iiba-640-916    | itsecurity-sscp    | cbtnuggets-300-320    | blogged-70-486    | pass4sure-IIA-CIA-PART1    | cbtnuggets-100-101    | developerhandbook-70-486    | lpicisco-101    | mylearn-1V0-605    | tomsitpro-cism    | gnosis-101    | channel9Mic-70-534    | ipass-IIA-CIA-PART1    | forcerts-70-417    | tests-sy0-401    | ipasstheciaexam-IIA-CIA-PART3    | mostcisco-300-135    | buildazure-70-533    | cloudera-cca-500    | pdf4cert-2v0-621    | f5cisco-101    | gocertify-1z0-062    | quora-640-916    | micrcosoft-70-480    | brain2pass-70-417    | examcompass-sy0-401    | global-EX200    | iassc-ICGB    | vceplus-300-115    | quizlet-810-403    | cbtnuggets-70-697    | educationOracle-1Z0-434    | channel9-70-534    | officialcerts-400-051    | examsboost-IIA-CIA-PART1    | networktut-300-135    | teststarter-300-206    | pluralsight-70-486    | coding-70-486    | freeccna-100-101    | digitaltut-300-101    | iiba-CBAP    | virtuallymikebrown-640-916    | isaca-cism    | whizlabs-pmp    | techexams-70-980    | ciscopress-300-115    | techtarget-cism    | pearsonitcertification-300-070    | testking-2v0-621    | isacaNew-cism    | simplilearn-pmi-rmp    | simplilearn-pmp    | educationOracle-1z0-809    | education-1z0-809    | teachertube-1Z0-434    | villanovau-CBAP    | quora-300-206    | certifyguide-300-208    | cbtnuggets-100-105    | flydumps-70-417    | gratisexams-1V0-605    | ituonline-1z0-062    | techexams-cas-002    | simplilearn-70-534    | pluralsight-70-697    | theiia-IIA-CIA-PART1    | itexamtips-400-051    | pearsonitcertification-EX200    | pluralsight-70-480    | learn-hp0-s42    | giac-gpen    | mindhub-102-400    | coursesmsu-CBAP    | examsforall-2v0-621    | developerhandbook-70-487    | root-EX200    | coderanch-1z0-809    | getfreedumps-1z0-062    | comptia-cas-002    | quora-1z0-809    | boson-300-135    | killtest-2v0-621    | learncia-IIA-CIA-PART3    | computer-gcih    | universitycloudera-cca-500    | itexamrun-70-410    | certificationHPv2-hp0-s41    | certskills-100-105    | skipitnow-70-417    | gocertify-sy0-401    | prep4sure-70-417    | simplilearn-cisa    |
http://www.pmsas.pr.gov.br/wp-content/    | http://www.pmsas.pr.gov.br/wp-content/    |