Migrating from MySQL/Oracle on macOS
The brew install on macOS does not support installing ora2pg, which is required for MySQL/Oracle database schema export. If you are planning to migrate MySQL or Oracle source databases on macOS, install yb-voyager using Docker instead.Perform the following steps to install yb-voyager using brew for macOS:
-
Tap the
yugabyteHomebrew repository using the following command:brew tap yugabyte/tapThe repository contains the formula to build and install
yb-voyageron your macOS device.Note that the tap
yugabyte/yugabytedbhas been updated toyugabyte/tap. If you have previously installed yb-voyager using the tapyugabyte/yugabytedb, untap the entry usingbrew untap yugabyte/yugabytedb, and then tap using the preceding command. -
Install PostgreSQL 17 (required for
pg_dumpandpg_restore) using Homebrew:brew install postgresql@17After installing PostgreSQL 17, Homebrew displays instructions on how to add the PostgreSQL 17 binaries to your shell's PATH. These steps vary depending on your system's Homebrew installation path (for example:
/opt/homebrewor/usr/local) and the shell you are using.-
Update your PATH by following the exact instructions shown by Homebrew. Following is an example of what Homebrew may display:
If you need to have postgresql@17 first in your PATH, run: echo 'export PATH="/opt/homebrew/opt/postgresql@17/bin:$PATH"' >> ~/.zshrc For compilers to find postgresql@17 you may need to set: export LDFLAGS="-L/opt/homebrew/opt/postgresql@17/lib" export CPPFLAGS="-I/opt/homebrew/opt/postgresql@17/include" -
After the update, restart your terminal and verify that both report to PostgreSQL 17:
pg_dump --version pg_restore --version
-
-
Install
yb-voyagerand its dependencies using the following command:brew install yb-voyagerTo install a specific version of
yb-voyager, use the following command:brew install yb-voyager@<VERSION> -
Check that yb-voyager is installed using the following command:
yb-voyager version