Forum Discussion

sab20's avatar
sab20
New Member
2 years ago
Solved

Connecting to MySQL server from powerBI

Hi! I am receiving this error mesaage when connecting to a remote MySQL server from my PowerBI desktop version. How does one overcome this? I have already downloaded the MySQL Connector net (ver - 9....
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi sab20 ,

    By the error message you provided, it appears that you are trying to make a MySQL remote connection. Before connecting to MySQL, you will need to do some configuration to ensure that the remote connection is successful.

    First, you need to Edit the MySQL Configuration File:
    Open the mysqld.cnf file, usually located at /etc/mysql/mysql.conf.d/mysqld.cnf. Find the line that starts with bind-address and change its value from

    bind-address = 127.0.0.1

    to

    bind-address = 0.0.0.0

    or simply comment out this line

    #bind-address = 127.0.0.1

    to allow connections from any IP address.
    Then restart MySQL:

    sudo systemctl restart mysql


    Then you also need Grant Remote Access to MySQL User:

    GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
    FLUSH PRIVILEGES;
    


    Finally, Configure Firewall. Ensure that your firewall allows traffic on MySQL’s default port (3306).

    sudo ufw allow 3306
    


    You can refer to these documents:
    How To Allow Remote Access to MySQL | DigitalOcean
    MySQL: How to allow remote connection to mysql - Stack Overflow
    How to Allow Remote Connections to MySQL (helpdeskgeek.com)

    Best Regards,
    Dino Tao
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.