[Solved] mariadb Access denied for user ‘root’@’localhost’

Error description [error] failed to initialize database, got error Error 1698: Access denied for user ‘root’@’localhost’ 2022/09/02 08:49:01 Error 1698: Access denied for user ‘root’@’localhost’ panic: database link failed Problem resolution 1. Clear the password of the root user sudo mysql -u root use mysql; update user set plugin=” where User=’root’; flush privileges; exit; 2. […]

[Solved] Connection is read-only. Queries leading to data modification are not allowed There are two ways to solve the problem

1. One case is caused by adding @Transactional(readOnly = true) to the class in the implementation class, In this case, you can annotate the method name with @Transactional(readOnly = false) 2. See if there is aop unified transaction processing in your framework restricts transactions starting with individual method names. I use the method starting with […]

[Solved] File upload error FileNotFoundException: C:\Users\XXX\AppData\Local\Temp\tomcat.9095.675054628671612619\work\

MultipartFile.transferTo(file); save temporary file error Error message: java.io.FileNotFoundException: C:\Users\XXX\AppData\Local\Temp\tomcat.9095.675054628671612619\work\Tomcat\localhost\ROOT\workspace\report-core\upload\zip\qq7TGXwf\010404.zip (the system cannot find to the specified path.) error source public static void decompress(MultipartFile zipFile, String dstPath) { try { File file = new File(dstPath + File.separator + zipFile.getOriginalFilename()); if (!file.getParentFile().exists()) { file.getParentFile().mkdirs(); } zipFile.transferTo(file); decompress(new ZipFile(file), dstPath); // delete after decompression file.delete(); } catch (IOException […]

[Solved] ERROR 2003 (HY000) Can’t connect to MySQL server on ‘localhost3306’ (10061) Solution

I want to start mysql, but the following problem occurs when I directly enter mysql -u root -p in cmd: C:Userslic>mysql -u root -p Enter password: ***** ERROR 2003 (HY000): Can’t connect to MySQL server on ‘localhost:3306’ (10061) Workaround: After running cmd as an administrator (win + Q, right-click after searching for cmd), enter net […]

[Solved] The first push of the git project prompts error: failed to push some refs to ‘https://github.com/xxx

Problem description: When your project is not pulled from the remote warehouse first, and then pushed, there may be a push rejected problem, ![rejected] cfj -> cfj (non-fast-forward) error: failed to push some refs to ‘https://gitee.com/xxx hint: Updates were rejected because a pushed branch tip is behind its remote hint: counterpart. Check out this branch […]

[Solved] The solution to the problem of spring boot’s Bean named ‘aaa’ is expected to be of type ‘bbb’ but was actually of type ‘bbb’

I believe that most of the back-end students use spring boot to develop in normal development, so when they use the bean factory to register beans, they may encounter Bean named ‘aaa’ is expected to be of type ‘bbb’ but was actually of type ‘bbb’ this error, so what is the cause of this problem? […]