how to allow port 3306 to connect remotely ubuntu code example
Example: digitalocean mysql connect remote
RENAME USER 'sammy'@'localhost' TO 'sammy'@'remote_server_ip';
RENAME USER 'sammy'@'localhost' TO 'sammy'@'remote_server_ip';