• <tfoot id='eo7fb'></tfoot>

          <bdo id='eo7fb'></bdo><ul id='eo7fb'></ul>
        <i id='eo7fb'><tr id='eo7fb'><dt id='eo7fb'><q id='eo7fb'><span id='eo7fb'><b id='eo7fb'><form id='eo7fb'><ins id='eo7fb'></ins><ul id='eo7fb'></ul><sub id='eo7fb'></sub></form><legend id='eo7fb'></legend><bdo id='eo7fb'><pre id='eo7fb'><center id='eo7fb'></center></pre></bdo></b><th id='eo7fb'></th></span></q></dt></tr></i><div id='eo7fb'><tfoot id='eo7fb'></tfoot><dl id='eo7fb'><fieldset id='eo7fb'></fieldset></dl></div>

        <small id='eo7fb'></small><noframes id='eo7fb'>

      1. <legend id='eo7fb'><style id='eo7fb'><dir id='eo7fb'><q id='eo7fb'></q></dir></style></legend>

        在MYSQL中将所有表和字段更改为utf-8-bin排序规则的

        时间:2023-10-03

          <legend id='GqIDV'><style id='GqIDV'><dir id='GqIDV'><q id='GqIDV'></q></dir></style></legend>

              <bdo id='GqIDV'></bdo><ul id='GqIDV'></ul>
            • <tfoot id='GqIDV'></tfoot>
            • <i id='GqIDV'><tr id='GqIDV'><dt id='GqIDV'><q id='GqIDV'><span id='GqIDV'><b id='GqIDV'><form id='GqIDV'><ins id='GqIDV'></ins><ul id='GqIDV'></ul><sub id='GqIDV'></sub></form><legend id='GqIDV'></legend><bdo id='GqIDV'><pre id='GqIDV'><center id='GqIDV'></center></pre></bdo></b><th id='GqIDV'></th></span></q></dt></tr></i><div id='GqIDV'><tfoot id='GqIDV'></tfoot><dl id='GqIDV'><fieldset id='GqIDV'></fieldset></dl></div>
                    <tbody id='GqIDV'></tbody>

                  <small id='GqIDV'></small><noframes id='GqIDV'>

                  本文介绍了在MYSQL中将所有表和字段更改为utf-8-bin排序规则的脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  是否有我可以运行的 SQLPHP 脚本来更改数据库中所有表和字段中的默认排序规则?

                  Is there a SQL or PHP script that I can run that will change the default collation in all tables and fields in a database?

                  我可以自己写一个,但我认为这应该在这样的网站上很容易获得.如果我能在有人发布之前自己想出一个,我会自己发布.

                  I can write one myself, but I think that this should be something that readily available at a site like this. If I can come up with one myself before somebody posts one, I will post it myself.

                  推荐答案

                  小心!如果您确实将 utf 存储为另一种编码,那么您的手上可能会一团糟.先备份.然后尝试一些标准方法:

                  Be careful! If you actually have utf stored as another encoding, you could have a real mess on your hands. Back up first. Then try some of the standard methods:

                  例如http://www.cesspit.net/drupal/node/898http://www.hackszine.com/blog/archive/2007/05/mysql_database_migration_latin.html

                  我不得不将所有文本字段转换为二进制,然后再转换回 varchar/text.这救了我的屁股.

                  I've had to resort to converting all text fields to binary, then back to varchar/text. This has saved my ass.

                  我的数据是UTF8,存储为latin1.我做了什么:

                  I had data is UTF8, stored as latin1. What I did:

                  删除索引.将字段转换为二进制.转换为utf8-general ci

                  Drop indexes. Convert fields to binary. Convert to utf8-general ci

                  如果你在 LAMP 上,不要忘记在与数据库交互之前添加 set NAMES 命令,并确保你设置了字符编码头.

                  If your on LAMP, don’t forget to add set NAMES command before interacting with the db, and make sure you set character encoding headers.

                  这篇关于在MYSQL中将所有表和字段更改为utf-8-bin排序规则的脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:通过 PHP 解码数字 html 实体 下一篇:将重音字符转换为它们的纯 ascii 等价物

                  相关文章

                  最新文章

                  <i id='zlrER'><tr id='zlrER'><dt id='zlrER'><q id='zlrER'><span id='zlrER'><b id='zlrER'><form id='zlrER'><ins id='zlrER'></ins><ul id='zlrER'></ul><sub id='zlrER'></sub></form><legend id='zlrER'></legend><bdo id='zlrER'><pre id='zlrER'><center id='zlrER'></center></pre></bdo></b><th id='zlrER'></th></span></q></dt></tr></i><div id='zlrER'><tfoot id='zlrER'></tfoot><dl id='zlrER'><fieldset id='zlrER'></fieldset></dl></div>

                  <small id='zlrER'></small><noframes id='zlrER'>

                1. <tfoot id='zlrER'></tfoot>

                    <legend id='zlrER'><style id='zlrER'><dir id='zlrER'><q id='zlrER'></q></dir></style></legend>

                    • <bdo id='zlrER'></bdo><ul id='zlrER'></ul>