How to Allow Remote MySQL Connection
Fix HeidiSQL connection issues by enabling external MySQL access in minutes.
Before you start
Step-by-step instructions
1. Create remote MySQL user
Create a user that can connect from any IP.
CREATE USER 'root'@'%' IDENTIFIED BY 'yourpassword';
2. Grant privileges
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';
FLUSH PRIVILEGES;
3. Update bind-address
Edit MySQL configuration file.
vi /etc/mysql/my.cnf
bind-address = 0.0.0.0
4. Restart MySQL
service mysql restart
Common issues
Make sure firewall or cloud security allows MySQL port.
MySQL will still block external access if bind-address is 127.0.0.1.
User must be created with '%' to allow remote access.