kali 虚拟机开启mysql:3306 供主机访问.

mysql -u root -p 

use mysql;

update user set host=‘ip‘ where user=‘root‘; //更新访问权限

flush privileges;   //更新数据库

/etc/init.d/mysql stop //停止服务

/etc/init.d/mysql start //开启服务

关闭linux防火墙.

安装:apt-get install ufw

关闭:ufw disable # To disable the firewall

开启:ufw enable # To enable the firewall

 

如果还不行的话,查看mysql.conf文件

修改/etc/mysq;

bind-address = 127.0.0.1 //修改为本机网卡ip;

save!

/etc/init.d/mysql stop //停止服务

/etc/init.d/mysql start //开启服务

ok....

 

文章来自:http://www.cnblogs.com/S4b0r/p/5049974.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3