Thursday, November 3, 2016

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="admin"
PASSWORD="mks14785"

(
  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"

7 comments:

  1. Tb-500 is often used in conjunction with a full range of rehabilitation products that will accelerate your rate of muscle growth, speed up the rate of tissue repair and protect injured muscles and tissues from further injury.

    ReplyDelete
  2. Good Research Paper Topics For Your College Degree
    One thing that really works well when researching the topic for a research paper is to come up with a few topics that you are interested in. Try writing them down on a piece of paper. Choose the one you think is the best and then break that topic down into smaller topics that relate to it specifically. When the topic is large, it can seem like an overwhelming process, but if you break it down into smaller topics, it can be much easier to get through it and finish. You can also visit https://www.the-essays.com/blog/research-paper-topics to get a few research paper topics.
    You will end up finishing with a great research paper and still be able to learn more about the topic that you chose to write your paper on.One of the best research paper topics to choose is something that is directly related to the topic of your choice. This is especially important if you are choosing to write on issues that affect teenagers and young adults. One of the biggest topics on which there has been an enormous amount of research is the issue of teen pregnancy. Many people feel that teen pregnancy is an issue that is related solely to poor parenting. However, there are some research results that show that teen pregnancy is caused by social issues and attitudes that influence teen pregnancy. Issues such as social unworthiness, discrimination against girls and poverty are all believed to be the main causes of teen pregnancy.If you are a parent, it is important to talk with your teenager about the topic of teen pregnancy. This can help the two of you bond over the idea and discuss together the issues that cause pregnancy in teenagers. However, if you want to have a good research paper, you have to start writing as early as possible. If you wait until later in your teen years, it may not be as easy to come up with good research paper topics to talk about and may even be difficult to write them at all.

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. Hey! My name is Lola and I am a student of Business School in New York. I am writing here now, cause I see how many readers students who also as me practice business staying at your blog. Recently I had trouble with one of my assignments, but one useful platform rescued me I just wrote them "please write my business report for me" and in a day receive flawless work. I guess the experience I have faced will be useful for you too.

    ReplyDelete
  5. She had a marvelous time ruining everything hearing test las cruces nm

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete