This is what happened: I installed Kali, then installed MySQL (mariadb), initialized the account password, but tried to log in remotely and failed. . . . Attempting to remotely log in to mysql failed, so Baidu must set up how to allow remote login. . . Because the firewall is closed, the remote login attempt fails. It is recommended to learn relevant knowledge through Baidu. . . If you don't understand, you can try to start the mysql service through Baidu and log in remotely, but the attempt fails. . . If I don’t understand, I checked a lot of methods on Baidu. Most of them are to solve network problems, but they can’t solve my problem. My host machine and kali network can ping each other, and kali can also access the Internet normally, so his network is definitely good. In the end , a post mentioned that port 3306 has always been bound to the 127.0.0.1 address, resulting in inability to access the bound address. It suddenly dawned on me
vim /etc/mysql/mariadb.conf.d/50-server.cnf #找到bind-address = 127.0.0.1 修改未0.0.0.0或者注释掉
systemctl restart mysql
netstat -autlnp
The above is the detailed content of How to solve the problem of changing the binding IP of kali virtual machine mysql. For more information, please follow other related articles on the PHP Chinese website!