MySQL to PostgreSQL Tutorial |
[MySQL to PostgreSQL Converter] [Introduction to Migration] [FAQ] |
The process of database migration from MySQL, MariaDB or Percona to PostgreSQL consists of the following steps:
On this screen you need to select the conversion scenario. MySQL to PostgreSQL converter provides two options to migrate MySQL:
By default the program uses local connection mode. It is indicated by radio button "Local" selected. To establish remote connection you should select "Remote" radio button. For remote MySQL servers you should also enter host and TCP/IP port to connect through. Host could be either network name or IP address. TCP/IP port value is necessary only if it differs from the default MySQL port number 3306. Otherwise you may leave this field as is.
Finally, you are entering user name and password. You can leave these fields empty for anonymous connection.
By default the program uses local connection mode. It is indicated by radio button "Local" selected. To establish remote connection you should select "Remote" radio button. For remote PostgreSQL servers you should also specify the host and the port to connect through. Host could be either network name or IP address. TCP/IP port value is necessary only if it differs from the default PostgreSQL port number 5432. Otherwise you may leave this field as is.
Enter user name and password or leave these fields blank for anonymous connection.
By default PostgreSQL server connects to database with name equal to the username specified. If there is no such database or PostgreSQL server does not allows access to it, custom database may be specifies on this wizard page.
Existing PostgreSQL script file will be overwritten.
Also, there are some settings to customize the database migration process:
To add a table for migration, select it in "Available tables" list and click "Add" button (or double-click the selected item). Use "Add all" button to add all available tables. To remove a table from "Selected tables" list highlight it and click "Remove" button. Use "Remove all" button to remove all items from "Selected tables" list.
Use "Add Query" button for composing SELECT-query to filter data that will be migrated to PostgreSQL. See Using Queries article for the further information.
To edit table or query double click the corresponding item in "Selected tables" list box. If it is a table, dialog box appears to edit table attributes and to define custom type mapping. See Edit Table article for the further information. If selected item is a query, you will see dialog box to edit SQL-statement of the query.
To add MySQL view for converting it into PostgreSQL format, highlight it in "Available queries" list and click "Add" button (or double-click the selected item). Use "Add all" button to add all MySQL views. To remove an item from "Selected queries" list, highlight it and click "Remove" button (or double-click the selected item). Use "Remove all" button to remove all MySQL views from "Selected queries" list.
Sometimes it is important to convert views into PostgreSQL format according to the particular order (for example, to preserve dependencies). Use "up" and "down" buttons in right part of the wizard page to organize all queries in the appropriate order.
Have questions? Contact us