Blog system of Java Web project (II)
6. Unable to load driverProgram: An error occurred while loading the driver! I am adding the user's lib, think about whether to directly put the jar package under the lib directory of web-INF
This solves the problem.
7. Another exception: cannot create poolableconnectionfactory (Access denied for user ''@ 'localhost' (using password: Yes ))
This problem is troublesome. At first, I thought that the root permission was not enough, so I changed the permission in navicat.
However, if the request fails, do I have to write a specific URL?
Change localhost to 127.0.0.1
However, it still failed. I finally found that the password was wrong! I am speechless! No way. It's been useless for a long time, so I forgot! Remember!
8. Another exception occurred, which is depressing. It means the character encoding is wrong.
Com. MySQL. JDBC. Exceptions. jdbc4.mysqlsyntaxerrorexception: unknown character set: 'utf8mb4'
Below is an explanation from Baidu. I tried it, but I still reported the above error.
Later I thought about it. I want to try GBK.
Default-character-set = GBK (there are two parts to be modified !)
Then I tested it again!
This data is finally inserted into the database. It's not easy!
Hehahaha, I have gained a lot today. It's a pity that the test is poor today. Well, forget it. Continue to work hard!