MySQL

Source and destination

📘

Whitelist IPs

If your database network-access policy requires whitelisting our IPs first, you can find them here: https://docs.polytomic.com/docs/whitelist-ips.

  1. Create a user on your MySQL database. You will supply this account's credentials to Polytomic. See the next section for required permissions and queries to execute.

  2. In Polytomic, go to ConnectionsAdd ConnectionMySQL.

  3. Enter host and credential details.

  1. Click Save.

Required MySQL user permissions

Create a MySQL user for Polytomic

These queries will create a user for Polytomic with access to your MySQL database:

CREATE USER 'polytomic_user' IDENTIFIED BY 'my_password';
GRANT SELECT ON my_database.* TO 'polytomic_user'@'%';

Read permissions

For reading from PostgreSQL, the Polytomic user (denoted with the polytomic_user placeholder below) requires the ability to read tables and the information schema:

GRANT SELECT ON ALL TABLES IN SCHEMA my_schema, information_schema TO polytomic_user;

Write permissions

If you would like Polytomic to also write to MySQL, the below permissions should be granted.

Database permissions:

  • CREATE
  • CREATE TEMPORARY TABLES

Table permissions:

  • INSERT
  • DELETE
  • UPDATE
  • ALTER
  • DROP (to allow a user-initiated full resync operation).