Change the Group-Office database collation and character set

Recently we converted the Group-Office database to the collation "utf8mb4_unicode_ci". We did this to support 4 byte unicode characters. Some customers may want to use another collation because of sorting in the database. For example Danish users want to use "utf8mb4_danish_ci". You can choose any collation as long as it starts with "utf8mb4".
You can use this bash script to convert all tables in the database.
Make a backup first!

#!/bin/bash
DB="go61mb4"
COLLATE="utf8mb4_unicode_ci"
USER="root"
PASSWORD="SECRET"

(
  echo 'set foreign_key_checks=0;ALTER DATABASE `'"$DB"'` \
  CHARACTER SET utf8mb4 COLLATE '"$COLLATE"';'
  mysql -u "$USER" -p"$PASSWORD"  "$DB" -e "SHOW TABLES" --batch --skip-column-names \
  | xargs -I{} echo 'ALTER TABLE `'{}'` \
  CONVERT TO CHARACTER SET utf8mb4 COLLATE '"$COLLATE"';'
) \
| mysql -u "$USER" -p"$PASSWORD" "$DB"

Comments


  • FLIP DIVING
    October 11, 2017 at 10:12

    This comment has been removed by the author.


  • Unknown
    November 06, 2017 at 09:53

    very nice submit, i definitely love this website, keep on it
    Movavi Video Editor Activation Key
    Avast Cleanup 2017 Activation Code
    Avast Premier Activation code
    wtfast crack


  • Rithika sri
    June 26, 2019 at 13:47

    This comment has been removed by the author.


  • priyavarsha
    July 13, 2020 at 17:20

    For most people in India, 50,000 still remains an unbelievably large amount. India is a poor country with very low per capita income. So in general, it is a very good salary. ... You can fulfil all your goals in life with a starting salary of Rs.
    https://www.acte.in/amazon-web-services-training-in-chennai
    https://www.acte.in/AWS-training-in-bangalore
    https://www.acte.in/AWS-training-in-hyderabad
    https://www.acte.in/AWS-training-in-coimbatore
    https://www.acte.in/aws-certification-training


  • ACTE
    July 28, 2020 at 14:57

    This comment has been removed by the author.

Back to Top
SourceForge.net Logo