记录下虚拟机上部署本地的spingboot项目遇到的问题
1、Linux系统下运行jar文件,提示:No main manifest attribute, in XXX.jar
pom.xml 文件修改配置
2、Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
修改数据库设置
1、项目中的database的IP设置为虚拟机的IP
2、数据库命令列界面输入如下:
GRANT ALL PRIVILEGES ON . TO ‘root’@‘192.168.0.105’ IDENTIFIED BY ‘root’ WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON . TO ‘root’@’%’ IDENTIFIED BY ‘root’ WITH GRANT OPTION;