<
From version < 51.1 >
edited by Thomas Mortagne
on 2020/02/11
To version < 52.1 >
edited by Thomas Mortagne
on 2020/02/11
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -70,18 +70,18 @@
70 70  
71 71  = Tips =
72 72  
73 -== Convert a database from latin1 (or collation utf8_ci) to utf8/utf8_bin ==
73 +== Convert a database from latin1 (or collation utf8_ci) to utf8mb4/utf8mb4_bin ==
74 74  
75 75  {{code}}
76 76  #!/bin/bash
77 77  
78 78  db=xwiki
79 -to_character_set=utf8
80 -to_collation=utf8_bin
79 +to_character_set=utf8mb4
80 +to_collation=utf8mb4_bin
81 81  
82 82  mysql_cmd="mysql -u root"
83 83  
84 -$mysql_cmd -e "ALTER DATABASE $db CHARACTER SET utf8 COLLATE utf8_unicode_ci;"
84 +$mysql_cmd -e "ALTER DATABASE $db CHARACTER SET $to_character_set COLLATE $to_collation;"
85 85  
86 86  TBL_LIST=$($mysql_cmd -N -s -r -e "use $db;show tables;")
87 87  

Get Connected