Home > Database > Mysql Tutorial > How to solve the problem of changing the binding IP of kali virtual machine mysql

How to solve the problem of changing the binding IP of kali virtual machine mysql

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2023-05-28 15:13:11
forward
1270 people have browsed it

Modify binding ip

Possible reasons

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

How to solve the problem of changing the binding IP of kali virtual machine mysql

##If you don’t understand, just Baidu—— ;It’s all about how to modify IP in ubantu and centos. Modify mysql.cnf. This file in kali does not have the bind-address field. There is no change if you write it directly.

Modify the mysql binding address in kali

Finally I saw a post, what was modified was mysqld.cnf in mysql.conf.d. I thought that mysql was mariadb, so I entered the /etc/mysql/mariadb.conf.d/ directory and found it. There are some configuration files

How to solve the problem of changing the binding IP of kali virtual machine mysql

#I feel that the truth is here, so I checked the files one by one, and sure enough I found the bind-address field in the file 50-server.cnf. Try Modified it

vim /etc/mysql/mariadb.conf.d/50-server.cnf #找到bind-address = 127.0.0.1 修改未0.0.0.0或者注释掉
Copy after login

Restart the service

systemctl restart mysql
Copy after login

View port

netstat -autlnp
Copy after login

How to solve the problem of changing the binding IP of kali virtual machine mysql

It feels good, 3306 is bound to 0.0.0.0 , the host navicat is finally connected! ! !

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!

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
MySQL stops process
From 1970-01-01 08:00:00
0
0
0
Error when installing mysql on linux
From 1970-01-01 08:00:00
0
0
0
phpstudy cannot start mysql?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template