Problem with upgrade-sql - from 2.5.4 to 2.6.0

72 views
Skip to first unread message

slawomir...@gmail.com

unread,
Sep 10, 2020, 8:56:47 AM9/10/20
to AtoM Users
Hi,

I have a problem with the upgrade task.


php -d memory_limit=-1 symfony tools:upgrade-sql

It gives me SQL error:

SQLSTATE[HY000]: General error: 1273 Unknown collation: 'utf8mb4_0900_ai_ci'


I had no problems with the upgrade from 2.5.3 to 2.5.4 - I did it the same way and then it was just working.


Regards
Sławomir

Dan Gillean

unread,
Sep 10, 2020, 5:30:54 PM9/10/20
to ICA-AtoM Users
H Slawomir, 

AtoM 2.5 used MySQL 5.7, while in version 2.6 we have moved to MySQL 8.0, where this new collation format is supported. Also, not sure if you are trying to upgrade in place, but our Upgrade instructions typically recommend installing a new version of AtoM (following the new installation documentation for that version), and then loading in the data to this new instance. My first question is: is your new 2.6 instance using MySQL8? See: 
If yes:

Did you remember to drop and recreate the database first? See steps 3 and 4 from the Upgrading notes here

3. If you’re upgrading from 2.5.x or lower to 2.6.x or higher make sure your data is on utf8mb3 or utf8 (the default if you followed the installation documentation) and that you are using MySQL 8.0 as that’s a requirement since AtoM 2.6. During the upgrade task, your data will be transformed to the utf8mb4 charset and the utf8mb4_0900_ai_ci collation.

4. Re-create the database with the new charset and collation:

mysql -u username -p -e "DROP DATABASE IF EXISTS atom;"
mysql -u username -p -e "CREATE DATABASE atom CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;"

This is typically done before you load your 2.5.4 data, so the collation format should be correct before you run the upgrade task. Please let us know if this helps!

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/2d277437-7f63-47bd-89c1-7f8031bc2d4en%40googlegroups.com.

slawomir...@gmail.com

unread,
Sep 15, 2020, 9:59:14 AM9/15/20
to AtoM Users
Thank you very much for the answer!


I forgot about system requirements for v. 2.6.0 - the problem was MySQL 5.7 on my machine. 

After upgrading MySQL to version 8, whole AtoM upgrade process ended successfuly


Regards,
Slawomir Bienias
Reply all
Reply to author
Forward
0 new messages