当前位置:网站首页>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 !
边栏推荐
- Go web programming practice (1) -- basic syntax of go language
- Research Report on market supply and demand and strategy of China's atomic spectrometer industry
- Accounting regulations and professional ethics [18]
- Research Report on the overall scale, major manufacturers, major regions, products and application segmentation of signal distributors in the global market in 2022
- Research Report on the overall scale, major manufacturers, major regions, products and applications of hollow porcelain insulators in the global market in 2022
- [error record] the command line creates an error pub get failed (server unavailable) -- attempting retry 1 in 1 second
- MySQL learning notes (Advanced)
- MySQL learning record (8)
- Roommate, a king of time, I took care of the C language structure memory alignment
- Common authority query instructions in Oracle
猜你喜欢
![[shutter] the shutter plug-in is used in the shutter project (shutter plug-in management platform | search shutter plug-in | install shutter plug-in | use shutter plug-in)](/img/80/215499c66243d5a4453d8e6206c012.jpg)
[shutter] the shutter plug-in is used in the shutter project (shutter plug-in management platform | search shutter plug-in | install shutter plug-in | use shutter plug-in)

Unexpectedly, there are such sand sculpture code comments! I laughed

Capacity expansion mechanism of ArrayList

kernel_ uaf
![The web version of xshell supports FTP connection and SFTP connection [detailed tutorial] continued from the previous article](/img/8f/6759b4685a129f9d10d6ea1dc8e61e.jpg)
The web version of xshell supports FTP connection and SFTP connection [detailed tutorial] continued from the previous article

Welfare, let me introduce you to someone

Hot backup routing protocol (HSRP)

rwctf2022_ QLaaS

treevalue——Master Nested Data Like Tensor

MySQL learning record (8)
随机推荐
Go web programming practice (2) -- process control statement
In depth research and investment feasibility report of global and Chinese isolator industry, 2022-2028
Huawei Hongmeng watch achieves fireworks display effect on New Year's Eve
Sword finger offer (II) -- search in two-dimensional array
Longest public prefix of leetcode
D4:非成对图像去雾,基于密度与深度分解的自增强方法(CVPR 2022)
China's noise meter market trend report, technical dynamic innovation and market forecast
Analysis of enterprise financial statements [1]
Baidu sued a company called "Ciba screen"
Research Report on crude oil tanker industry - market status analysis and development prospect forecast
Volvo's first MPV is exposed! Comfortable and safe, equipped with 2.0T plug-in mixing system, it is worth first-class
Research Report on market supply and demand and strategy of microplate instrument industry in China
A river of spring water flows eastward
Research Report on the overall scale, major manufacturers, major regions, products and applications of sliding door dampers in the global market in 2022
MySQL learning record (8)
[shutter] shutter layout component (opacity component | clipprect component | padding component)
kernel_ uaf
[error record] the command line creates an error pub get failed (server unavailable) -- attempting retry 1 in 1 second
Cloud computing technology [1]
Research Report on minimally invasive medical robot industry - market status analysis and development prospect prediction