High severityconnection
Power BI Refresh Error:
2006
What does this error mean?
The MySQL connection was dropped mid-session — typically due to a timeout, large packet, or server restart.
Common causes
- 1The query or transaction exceeded the wait_timeout or interactive_timeout MySQL server variable
- 2A packet larger than max_allowed_packet was sent
- 3The MySQL server was restarted while the connection was active
- 4Network interruption between the client and server during a long-running query
How to fix it
- 1Step 1: Increase timeout values: `SET GLOBAL wait_timeout=28800; SET GLOBAL interactive_timeout=28800;`
- 2Step 2: Increase max packet size if sending large data: `SET GLOBAL max_allowed_packet=134217728;`
- 3Step 3: Implement connection retry logic in the application or use connection pooling with reconnect enabled.
- 4Step 4: Check MySQL error log for server-side restarts that caused the dropped connection.
Frequently asked questions
Official documentation: https://dev.mysql.com/doc/mysql-errors/8.0/en/server-error-reference.html