Input mysql-uroot-p under the shell can be logged in, so the problem should be that MySQL does not allow root users to log on remotely, so by entering the following command:
- GRANT all privileges on * * to [e-mail protected] "%" identified by ' password ' with GRANT OPTION;
After restarting MySQL, the discovery is still not connected, so I think the firewall (UFW) or iptables disabled port 3306. With service iptables stop and UFW status, you can see that the discovery is not a firewall or iptables problem, and that the 3306 port is listening by Netstat. After the exclusion of the above factors, and Google, found that the problem appears in MySQL configuration file my.cnf, through the following modifications, after restarting MySQL, successfully telnet, Opennebula successfully connected to the MySQL database.
- sudo vim/etc/mysql/my.cnf
- Find the following and comment
- Bind-address = 127.0.0.1
Comment out bind-address = 127.0.0.1 and restart MySQL (service mysql restart)!
Ubuntu MySQL Remote connection problem solving method