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] localhost has refused to connect, the following is the solution
This picture is the state I’m having problems with! Below are my corrections and everything is the same except for the page shown, and the file location has not changed. In the bottom left of the .json file there is Add configuration I was in the previous error page I chose Chrome lunch, the reason […]
[Solved] A solution to CUDA out of memory for T5-large model
Let’s talk about the conclusion first: the optimizer is changed to AdaFactor Recently, I used the Google T5model model for some semantic recovery experiments. I referenced some codes on github. At the beginning, I used the T5-base model to train on the server. I used a 30-series graphics card with a video memory of 8192MiB […]
[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] ValueError: not enough values to unpack(expected 2, got 1) in collate_fn
DataLoader is used to process data in NLP. When defining Collate_fn, ValueError keeps appearing, which are: ValueError: not enough values to unpack (expected 2, got 1) VauleError: too much values to unpack (expected 2) The corresponding line in error is: def collate_fn(batch): for x,y in batch //error line ?… ?… return (The input and output […]
[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? […]
[Solved] Spring ordinary java class using @Autowired injection is null problem solution
Problem: Sometimes we inject service or mapper into common classes or tool classes, then we directly use @Autowired injection. The injected service or mapper cannot be used directly in the method, and will report null. On the other hand, if it is a tool class, the tool class generally contains static methods and cannot be […]