2,189 views

Wamp配置mysql编码

By | 2016年10月8日

因为之前做.net的时候,玩了玩儿PHP,所以用的wamp server 一直在,后来做java项目,也就一直用着上面的mysql.

但是中间出现过好几次乱码,额,今天又改了改wamp的mysql配置:

1,client:

这里 设置的是Wamp客户端的编码.

2,mysql:

这是配置在客户端输入时的编码

3,mysqld:

这是配置mysql服务端的编码。

修改完成之后在console查一下,看看是否成功:

show variables like ‘%char%’;

IDCRMsnf9DgAAAAAAAAAAACwqvM8z/N8O4q6r8QJAMAoXymEX4kTAI6jlLPIYlUdP5yN3u3i+KM/XFqT+h0GceblqAP4hvNfxbdeCWbypM30aJ2ezv534T/fvHQN/Rbkn8brrepcveJx5v3QeQOA47DT1is1e/KMc/jreuUT9sOezWEk5XNCPA3zAsCinCw2OcH9aj6lYB8UbAC/7czcG5M+xVvy0Y7gr/EG5bhinMUF5v3vLcULf8biFH6Lv+fWLPdGJzx/HGcfnMX641u3OwuMTmqF4YxQnNSK1okwv/bn9QMGAMk9gd4v8uSVXOQvk1xsdfPD6MWJ34o576/0dOZVrpOQqvvmjOlEWG3RAyiyujnz+hM1n4ekglpjhs6D8ryceQGgDyv1FC8OOTWH8u+IBBeNs9ou5uLqXiUVwh/Tf8svKv444j6IogVbj6fNtTnVdSkbFXpe1GwAo0QL9mH86LK5YI9LbaE4/fZQInZqUvGt6OYUx4nu/5kpvmUFpsTpz6vHE3XfHOv5WhHm++D3qc4LAN3kGa2Ys/TblZfV9u6qcfrtoSxczfLi5hTfssaJ7n9oLc3dnHn1TYjqUrAbnhcFG8BY0YKt1KHqXU5jL22FuXh7NelXZz/imxMd5/5SKc8N++BoKNjOtT6vM2NeOJVnWvxyCB1mCjaAUa58lF8cwo9SndH8/qMzWnFe8WU1iSuzWyHlF9ak/ltH6Uk1jJO0O/2tlerj3F/6t1TndeIpXucBiC/zi2KQ/rxKtADwSHNCIRMBVXyZAOjgyQed55+TgB3wNQIAAAAAAAAAAAAAAAAAAAAAAAAAALA8/pNQrIBzCGA34bx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u/vxJnf6Mzl3FvcxujZaOgzLR7xGIj9nUZLqHPL6PcNUl7mF0m3ZPDDeAbFW/zOeWDWIM5KlfGdeJ5MfdS2rmHwZSnxn5liB3GK0/4itDa/2rjsvFb/4n76L4sLseIsrtSat7gVSv+l4nEarbD1/mdGnOXIzkM+iPIyv/A3zV+4dUv3eMS3ikGetX2rrssR6tx0AzDAnHPYfRZxwJ+Zd3IY0RtXi2c1q8W/Wjy96OuiYAechl+dd2VfLNj6g/uNeRvGf3KwG74uVotnNasFv1o8vQws2AAAAAAAAAAAAAAAAAAAAAAAAACAqfjvwLACziGA3fCHU/BJnEMAu6Fg45M4hwB2o+Y9609jWn8vk3ba57SfnEPaaad9s/brrQq1HzAS5xDAbsJ5j0SJFXAOAeyGgo1P4hwC2A15DwAAAAAAAAAAAAAAAAAAAAAAAACwn5/5r+t+ZiEAAKR+rMj92HIA4HvCf3b8JetHeFcMNboEq/9bW/Gh/QeAX5Ok4JUz8tcL9v3/0BIawXpG83fjQ/sPAL/mQwX7RdFtcaq1OKBYpKnZALCL1wvAJ1CwX5wRAPB/+o9Y77/qzn/tnf8uPOl8v0j6h6ZOGq13q0NV448Geb/Lb1HWW3wZHecIrjd5qxoYAGCqaDXK60exkCTlwXorf+lM7QSjjNNWCKNVap2C3TCOv58UbAB4xf8Aq7PP323XmBYAAAAASUVORK5CYII=” />

改完之后,restart下,发现我servlet中获取到的数据还是乱码的。

发表评论

电子邮件地址不会被公开。 必填项已用*标注