Struggling with elementary Web development, both hibernate and basic jdbc involve a coding problem. After all, this set of programming was invented by the foreign bank of lunjia. I had to bow my head in the Greater China Program, few gossip. Strictly speaking, three points:
1. Add two entries to the mysql configuration file my. ini. The default encoding is configured here when mysql is started.
[Client]
Default-character-set = UTF8 manually added)
[Mysqld]
Default-character-set = UTF8 manually added)
2. Enter the database:
-> D:
-> Cd mysql/bin
-> Mysql-u root-p
-> Enter the password.
-> Use Database Name
-> Show variable like 'character % '; (view the character set of the current database)
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131229/2054392A6-0.jpg "title =" 123.bmp "alt =" 151129731.jpg"/>
The first step should be like this. If not, then various sets will look like this.
For example:-> set character_set_client = utf8;
3. If the previous two steps still do not work, you may have encountered the same problem. We recommend that you download a database management software Navica to save time.
T650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131229/2054394I8-1.jpg "title =" tttt.bmp "alt =" 151505531.jpg"/>
The following table shows the design page:
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131229/2054396013-2.jpg "title =" 1111111.bmp "alt =" 151749617.jpg"/>
You can modify the encoding of any field or directly operate the values in the database table here, which is very convenient for beginners to learn.
So far, I spent more than 24 hours searching for the three points that are really useful in Baidu, which is so vast that I hope it will be useful to later users. If you have the opportunity, you may want to use the most fundamental method to solve the encoding problem. However, as a cainiao, it is better to start from 0.
This article from the "Java practical development accumulation" blog, please be sure to keep this source http://yufenghang.blog.51cto.com/6014821/1300606