linux启动jar包报错Communications link failure
报错信息
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
create connection SQLException, url: jdbc:mysql://www.shaoming.com:3306/renren_security?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai, errorCode 0, state 08S01
网上找到的解决参考
https://blog.csdn.net/qq_40558766/article/details/89966987?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522164977127516781685387372%2522%252C%2522scm%2522%253A%252220140713.130102334…%2522%257D&request_id=164977127516781685387372&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2allsobaiduend~default-2-89966987.142v7control,157v4control&utm_term=usessl%3Dfalse%E4%BD%9C%E7%94%A8&spm=1018.2226.3001.4187
https://blog.csdn.net/sungancd/article/details/119183605?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522164977127516781685387372%2522%252C%2522scm%2522%253A%252220140713.130102334…%2522%257D&request_id=164977127516781685387372&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2allsobaiduend~default-3-119183605.142v7control,157v4control&utm_term=usessl%3Dfalse%E4%BD%9C%E7%94%A8&spm=1018.2226.3001.4187
https://blog.csdn.net/sunzxhqq/article/details/116458586?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522164977100016780269834522%2522%252C%2522scm%2522%253A%252220140713.130102334…%2522%257D&request_id=164977100016780269834522&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2allsobaiduend~default-1-116458586.142v7control,157v4control&utm_term=state+08S01&spm=1018.2226.3001.4187
解决方案
修改之前的 数据库连接信息
url: jdbc:mysql://www.shaoming.com:3306/renren_security?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
修改之后的数据连接信息
url: jdbc:mysql://www.shaoming.com:3306/renren_security?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useSSL=false
|