How can I change my MySQL collation in WAMPSERVER

扶醉桌前 提交于 2019-11-30 21:59:01

You could use

set names 'utf8'

each time you open a connection.

Or add the following line to your my.ini file and restart your server.

default-character-set=utf8

If you've already got tables set up you'll need to alter them too you can alter them with:

ALTER TABLE tablename COLLATE utf8_general_ci

etc or pop into phpmyadmin and do it there. Remember if you alter database collation it'll only affect new tables created after that not pre-existing ones in that database already, so you will need to alter them also.

put in your C:\wamp\bin\mysql\mysql5.5.24\my.ini:

character-set-server=utf8    
collation-server=utf8_general_ci
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!