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, so the problem should be that mysql does not allow the root user to remotely
To solve the logon problem, 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. So I thought whether the firewall (ufw) or iptables disabled the port 3306.
Through service iptables stop and ufw status, it is not a firewall or iptables problem.
Netstat shows that port 3306 is in the listening status. After www.2cto.com ruled out the above factors, google again, and found that the problem occurs in the mysql configuration file my. cnf, through the following
Modify, restart mysql, and log on remotely. 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 note
Release. You can see through netstat that port 306 only listens to the IP address 127.0.0.1, so access from other IP addresses is denied.