ERROR 2003 (HY000): Can't connect to MySQL server on 'ip' (111)

Using the command line mysql -u grafana -p -h ipdiscovery 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

Guess you like

Origin www.cnblogs.com/westlin/p/11611675.html