Using the command line mysql -u grafana -p -h ip
discovery has been successful connection, examples of the later discovery and target machines are running mysql, but different ports of the machine and is connected to the port of the machine provided
Solution, add port parameters
mysql -u grafana -p -h ip -P 3306
then the connection is successful