Forum Discussion
Failed to update data source credentials: MySQL: Unable to connect to any of the specified MySQL
- Anonymous1 year ago
Hi hruthik_raj,
Thank you for reaching out to the Microsoft Fabric Forum Community.
Can You please try below troubleshoot Points to resolve the issue:Change localhost to your actual server name.
Open port 3306 on the MySQL server.
Use mysql native password for the MySQL user.
Ensure network access from the gateway to the MySQL server.
Update gateway to the latest version.
If you find this response helpful, please consider marking it as the accepted solution and giving it a thumbs-up to support others in the community.
Best regards,
Prasanna Kumar - 1 year ago
Hi hruthik_raj,
From the error message and the screenshot you provided, it looks like Power BI Service is unable to connect to your on-premises MySQL server even though your personal gateway appears to be running and the connection works fine in Power BI Desktop. This issue is often caused by a few common factors:
First, double-check that your gateway is not just installed, but also properly configured and running on the machine where the MySQL server is accessible. Unlike Power BI Desktop, which connects directly from your computer, Power BI Service relies on the gateway to act as a bridge between the cloud and your on-premises data.
Second, verify that the MySQL server allows connections from the gateway host. If you're using "localhost" as the server name, remember that when the gateway tries to connect, "localhost" refers to the gateway machine, not necessarily the database server machine. If your MySQL server is on a different machine, use its actual network name or IP address instead.
Additionally, check firewall settings on both the MySQL server and the gateway machine to ensure the relevant port (usually 3306 for MySQL) is open. Also, make sure the root user is allowed to connect remotely, not just from localhost, by checking the user’s host permissions in MySQL.
Finally, confirm that you have the correct MySQL connector/ODBC driver version installed on the gateway machine, as mismatched drivers can sometimes cause connection problems. If all else fails, try restarting both the gateway service and your MySQL server, and double-check that the credentials you’re entering in Power BI Service exactly match those used in Power BI Desktop.
If you’ve checked all these and the issue persists, providing the exact gateway logs may help further diagnose the connection failure.
Hi hruthik_raj,
From the error message and the screenshot you provided, it looks like Power BI Service is unable to connect to your on-premises MySQL server even though your personal gateway appears to be running and the connection works fine in Power BI Desktop. This issue is often caused by a few common factors:
First, double-check that your gateway is not just installed, but also properly configured and running on the machine where the MySQL server is accessible. Unlike Power BI Desktop, which connects directly from your computer, Power BI Service relies on the gateway to act as a bridge between the cloud and your on-premises data.
Second, verify that the MySQL server allows connections from the gateway host. If you're using "localhost" as the server name, remember that when the gateway tries to connect, "localhost" refers to the gateway machine, not necessarily the database server machine. If your MySQL server is on a different machine, use its actual network name or IP address instead.
Additionally, check firewall settings on both the MySQL server and the gateway machine to ensure the relevant port (usually 3306 for MySQL) is open. Also, make sure the root user is allowed to connect remotely, not just from localhost, by checking the user’s host permissions in MySQL.
Finally, confirm that you have the correct MySQL connector/ODBC driver version installed on the gateway machine, as mismatched drivers can sometimes cause connection problems. If all else fails, try restarting both the gateway service and your MySQL server, and double-check that the credentials you’re entering in Power BI Service exactly match those used in Power BI Desktop.
If you’ve checked all these and the issue persists, providing the exact gateway logs may help further diagnose the connection failure.