Question: springboot project to deploy Linux virtual machine, jdbc IP can not be used to access local physical machine database

First of all allow mysql to be accessed remotely
in the mysql database (that comes with database) to add or modify an existing user in the remote access allows it to be

use mysql;
//授权可以用户名(user)通过密码(passwd)以任何ip地址(%)访问任何数据库(*.*)
grant all privileges on  *.*  to  'user'  @'%'  identified  by  'passwd';
//使命令生效

When deployed in linux found it impossible to access the local mysql, this time to shut down the local windows firewall

Guess you like

Origin www.cnblogs.com/wen-xin/p/11832481.html