When opennebula 3.8 is configured today, when one start is started, an error indicating that the database cannot be connected is reported. However, you can log on by entering mysql-uroot-P in shell, therefore, the problem should be that MySQL does not allow the root user to log on remotely. Therefore, run the following command:
- Grant all privileges on *. * to root @ "%" identified
By 'Password' with grant option;
After I restarted MySQL, I found that I still couldn't connect to it. So I thought whether the firewall (UFW) or iptables disabled the port 3306. Through service iptables stop and UFW status, check that it is not a firewall or iptables problem, and through netstat, you can see that port 3306 is in the listening status.
After excluding the above factors, I Google again and found that the MySQL configuration file my. in CNF, use the following modification. After MySQL is restarted, it is successfully remotely logged on and opennebula is connected to the MySQL database.
- Sudo Vim/etc/MySQL/My. CNF
- // Locate the following content and comment out
- Bind-address = 127.0.0.1
Comment out bind-address = 127.0.0.1 and restart MySQL! If you do not comment it out, you can see through netstat that port 306 is only in the IP address
Listen on 127.0.0.1, so access from other IP addresses is denied.