Jump to content

Change UTF8 to UTF8MB4


Recommended Posts

On 24 de junho de 2015 at 9:35 PM, AutoItScript said:

It won't work. You'll still come across the index too long issue as I keep saying...  Well you're not going to be happy until you get a step by step so try this. At your own large risk!

  • Backup your board.
  • Take the board offline
  • Backup your board!!!!
  • Add/Change conf_global.php to include 'sql_utf8mb4' = true
  • In the ACP goto Support -> Something is not working
  • It will spit out hundreds of MySql commands, copy them to a text file (there's no chance of them working from Fix Automatically unless your board is small)
  • Run the commands in phpmyadmin one by one or in small batches. Make a note of the tables that give errors about indexes being too long

For the tables with index-too-long error:

  • Goto the table / Structure tab.
  • Scroll down and click on "+indexes"
  • Delete all but the primary indexes
  • Rerun the Support tool in the ACP, it should give you the correct command to recreate the index with the correct length

Is it possible to IPS make a script to change that database collation from utf8 to utf8mb4 for those that did not chose this collation on the 3.4 to 4.0 upgrade?

Link to comment
Share on other sites

On 24 June 2015 at 9:35 AM, AutoItScript said:
  • Add/Change conf_global.php to include 'sql_utf8mb4' = true
  • In the ACP goto Support -> Something is not working
  • It will spit out hundreds of MySql commands

I just tried this on a test installation, but changing the conf_global did not seem to do anything at all. Is that really all we would have to do to start this process?

Link to comment
Share on other sites

  • 2 weeks later...

Doubt it - that is intended to update a database that is not UTF8/UTF8MB4 to one of either UTF8 or UTFMB4 - if the database is already UTF8 then I doubt it would do any conversion.

Easy way to figure it out for yourself - that database checker is included in the IPS4 package.....go to http://www.yourdomain.com/admin/convertutf8/ and see what it says to you.

Edited by Nathan Explosion
Link to comment
Share on other sites

1 hour ago, Nathan Explosion said:

Doubt it - that is intended to update a database that is not UTF8/UTF8MB4 to one of either UTF8 or UTFMB4 - if the database is already UTF8 then I doubt it would do any conversion.

This is correct. I tried it on a test site and it says nothing to convert.

Link to comment
Share on other sites

5 hours ago, Ausy said:

This is correct. I tried it on a test site and it says nothing to convert.

Yes, it is working as designed by IPS.

Certain criteria that must be matched in order to move to the newer character set (UTF8MB4). Not everyone will be migrated and it's based MySQL version.

The current IPB converter will not convert to UTF8MB4 if you are already on IPB4. If you are moving from IPB3 to IPB4 it will migrate, but I believe you must set the config to UTF8MB4 prior to the upgrade (?).

Link to comment
Share on other sites

Just now, mesteele101 said:

but I believe you must set the config to UTF8MB4 prior to the upgrade (?).

no it does it during the upgrade for u i just upgraded from 3.4.9 to 4.1 and had a table crash , had to repair it but all went smooth with the upgrade .

Link to comment
Share on other sites

10 hours ago, W4L said:

no it does it during the upgrade for u i just upgraded from 3.4.9 to 4.1 and had a table crash , had to repair it but all went smooth with the upgrade .

In the config don't you have to set:

$INFO['sql_charset']   = '****';

to:

$INFO['sql_charset']   = 'utf8mb4';

Did your 3.x automatically migrate the tables to character set UTF8MB4

Link to comment
Share on other sites

  • 3 weeks later...

I think it would be a great idea to have an official convertor. I too chose UTF-8 at the time, because I wasn't too sure about the choice and erred on the side of caution in the heat of the moment. The installer made it sound like it was more about being able to post music symbols and things which didn't bother me. Unless I dreamed that. I have slept since then. 

This is the sort of tool we need, I really miss the old AdminCP, the dumbed down version is a hinderence too with things like advanced options and caching, recounting etc hidden away or disguised behind an all seeing, all knowing mysterious support tool. But that's another story!

Link to comment
Share on other sites

yep i just checked the box for UTF-8 tooo, didnt really realize that it can not be undone .................

the converter is a script that can be done in max. 5 hours but i wait until invision does it ...

 

Edited by Batnik
Link to comment
Share on other sites

There is absolutely no upside for IPS to invest one second into this project. IPS's only concern is with the new 4.x installs, which, by default automatically sets the character set to UTF8MB4.

When you upgraded from 3.x you had one shot at the conversion. This was not something IPS made a point of telling anyone., especially early adopters of 4.x.

Could they do this, sure, but again, there is no upside for IPS...

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...