Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The way to solve the problem of springboot connecting to mysql Times wrong usingpassword:NO

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article introduces the relevant knowledge of "how to solve the problem of springboot connecting mysql Times to wrong usingpassword:NO". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Recently there was an error Access denied for user'@ 'localhost' (using password: YES) or Access denied for user' @ 'localhost' (using password: NO) when configuring mysql with springboot

It is found that this is a pit in the yml syntax of springboot. The format of yml recommended in the latest version 2.2.4 of springBoot I am using is

Data-username: rootdata-password: 112233

It is the format with data- that led to this error.

Using data-username alone to report errors using password: YES

If you use data-password to report an error using password: NO

Later, looking at the source code, we found that there is a description of the parameters of username and password: Login username of the database./ Login password of the database. The descriptions of data-username and data-password are different:

Username of the database to execute DML scripts (if different). / Password of the database to execute DML scripts (if different). The user name of the database where the DML script was executed, if any.

This is the end of the content of "how to solve the problem of springboot connecting to mysql Times wrong usingpassword:NO". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report