更新时间:2023-09-12 11:39:16
您可以使用
set names 'utf8'
每次打开连接时.
或将以下行添加到my.ini文件中,然后重新启动服务器.
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或弹出phpmyadmin并在那里执行.请记住,如果您更改数据库排序规则,它只会影响在此之后创建的新表,而不会影响该数据库中已经存在的表,因此您还需要更改它们.
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.