当前位置:网站首页>Jar package startup failed -mysql modify the default port number / set password free enter
Jar package startup failed -mysql modify the default port number / set password free enter
2022-07-02 21:34:00 【yaoyaozaiye】
【 Issues an error 】
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
Start the site jar The package reported an error ,Mysql Can't connect .
【 Cause analysis 】
There may be two reasons for thinking :
The first is Mysql Password set , This leads to the need for password connection , The connection fails ;
The second is Mysql The default port number is 3306,jar Configured in the package mysql The port number configured on the server is 3307.
【 resolvent 】
Solution ①: Set up Mysql Secret free entry
- modify Mysql Configuration file for :
vi /etc/my.cnf - Add
skip-grant-tables
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid - Restart after saving Mysql service :
systemctl restart mysqld - restart jar package , Still not connected Mysql.
Solution ②: modify Mysql Default port number
- modify Mysql Configuration file for :
vi /etc/my.cnf - Add... After the document
port=3307
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock - Restart after saving Mysql service
systemctl restart mysqld - Alibaba cloud server , Security group policy is open 3307 port
- restart jar package , success !
边栏推荐
- Research Report on micro vacuum pump industry - market status analysis and development prospect prediction
- Research Report on market supply and demand and strategy of China's plastic trunking industry
- D4:非成对图像去雾,基于密度与深度分解的自增强方法(CVPR 2022)
- Sword finger offer (I) -- handwriting singleton mode
- [shutter] shutter layout component (physicalmodel component)
- Construction and maintenance of business websites [10]
- Add two numbers of leetcode
- Hot backup routing protocol (HSRP)
- Construction and maintenance of business website [3]
- Research Report on market supply and demand and strategy of China's atomic spectrometer industry
猜你喜欢

7. Build native development environment

Redis分布式锁故障,我忍不住想爆粗...
![[shutter] shutter layout component (physicalmodel component)](/img/6a/f8161fb7c8e9012456622f1920da64.gif)
[shutter] shutter layout component (physicalmodel component)
![[shutter] statefulwidget component (floatingactionbutton component | refreshindicator component)](/img/17/b5889ec263687aeacf19214785ea8a.jpg)
[shutter] statefulwidget component (floatingactionbutton component | refreshindicator component)

读博士吧,研究奶牛的那种!鲁汶大学 Livestock Technology 组博士招生,牛奶质量监测...

Investment strategy analysis of China's electronic information manufacturing industry and forecast report on the demand outlook of the 14th five year plan 2022-2028 Edition

Go language learning summary (5) -- Summary of go learning notes

Report on investment development and strategic recommendations of China's vibration isolator market, 2022-2027
![[shutter] statefulwidget component (create statefulwidget component | materialapp component | scaffold component)](/img/04/4070d51ce8b7718db609ef2fc8bcd7.jpg)
[shutter] statefulwidget component (create statefulwidget component | materialapp component | scaffold component)

I drew a Gu ailing with characters!
随机推荐
Chinese Indian seasoning market trend report, technical dynamic innovation and market forecast
MySQL learning notes (Advanced)
Golang embeds variables in strings
Go cache of go cache series
Analysis of enterprise financial statements [4]
Roommate, a king of time, I took care of the C language structure memory alignment
1007 maximum subsequence sum (25 points) "PTA class a exercise"
Get weekday / day of week for datetime column of dataframe - get weekday / day of week for datetime column of dataframe
MySQL learning record (8)
China's log saw blade market trend report, technological innovation and market forecast
rwctf2022_ QLaaS
Longest public prefix of leetcode
Construction and maintenance of business websites [8]
Micro SD Card Industry Research Report - market status analysis and development prospect forecast
Construction and maintenance of business website [5]
Research Report on plastic antioxidant industry - market status analysis and development prospect forecast
China's noise meter market trend report, technical dynamic innovation and market forecast
treevalue——Master Nested Data Like Tensor
qwb2018_ core kernel_ rop
Happy Lantern Festival! Tengyuanhu made you a bowl of hot dumplings!