如何更改数据库,表,列的排序规则? [英] How to change collation of database, table, column?

查看:63
本文介绍了如何更改数据库,表,列的排序规则?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

数据库现在为latin1_general_ci,我想将排序规则更改为utf8mb4_general_ci.

The database is latin1_general_ci now and I want to change collation to utf8mb4_general_ci.

PhpMyAdmin中是否有任何设置可以更改数据库,表,列的排序规则?而不是一一改变?

Is there any setting in PhpMyAdmin to change collation of database, table, column? Rather than changing one by one?

推荐答案

您需要单独转换每个表:

You need to either convert each table individually:

ALTER TABLE mytable CONVERT TO CHARACTER SET utf8mb4 

(这也将转换列),或者使用latin1导出数据库,然后使用utf8mb4导入回数据库.

(this will convert the columns just as well), or export the database with latin1 and import it back with utf8mb4.

这篇关于如何更改数据库,表,列的排序规则?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆