Get the App
SLTechnology News&Howtos  ›  Development  › 

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

Shulou Source: shulou.com Published: 2022-06-03 11:21:37 11月11日 Update

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!

Tags: Methods Times content more formats knowledge errors different practical successful next parameters dilemmas reality that is situations data databases articles cases Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn MariaDB Xiaomi Apple MySQL