metricsign
Start free
High severitypermission

Power BI Refresh Error:
1142

What does this error mean?

The MySQL user lacks the required privilege (SELECT, INSERT, UPDATE, DELETE, etc.) on the target table.

Common causes

  • 1The service account was granted privileges on the database but specific table-level grants were not applied
  • 2A new table was added but the service account's grants were not updated
  • 3GRANT was applied at database level with specific privilege exclusions

How to fix it

  1. 1Step 1: Check what privileges the user has: `SHOW GRANTS FOR 'your_user'@'%';`
  2. 2Step 2: Grant the missing privilege: `GRANT SELECT, INSERT, UPDATE ON your_db.your_table TO 'your_user'@'%'; FLUSH PRIVILEGES;`
  3. 3Step 3: Or grant at database level to cover all tables: `GRANT SELECT, INSERT, UPDATE, DELETE ON your_db.* TO 'your_user'@'%'; FLUSH PRIVILEGES;`

Frequently asked questions

What MySQL privileges does an ADF service account need for a copy activity?

For source (read): SELECT. For sink (write): INSERT, UPDATE, DELETE, and CREATE if ADF manages table creation. Grant these at the database level: `GRANT SELECT, INSERT, UPDATE, DELETE ON db.* TO 'user'@'%';`

What MySQL privileges does a dbt service account need?

dbt needs SELECT, CREATE, DROP, INSERT, UPDATE, DELETE, ALTER, and REFERENCES on the target schema. Grant: `GRANT SELECT, CREATE, DROP, INSERT, UPDATE, DELETE, ALTER, REFERENCES ON db.* TO 'dbt_user'@'%';`

Can MetricSign detect when privilege changes break a pipeline?

Yes — MetricSign captures the ADF pipeline failure and surfaces the MySQL error code, immediately alerting you to the permission issue.

Official documentation: https://dev.mysql.com/doc/mysql-errors/8.0/en/server-error-reference.html

Other permission errors