0

When i dump mysql data out , some data has changed because of the character_set_system which is UTF8.Server , client and connection character sete are utf8mb4.

I guess the problem is system character set and server character set differences.

I am trying to change system caharacter set from UTF8 to utf8mb4 with this

Change MySQL default character set to UTF-8 in my.cnf?

But i can not

  • Do not apply permanent change (in `my.ini`). And even global change (`SET GLOBAL ..`). You may break your system in another points. Change needed settings for the current session only with according `SET SESSION variable=value`. – Akina Oct 27 '21 at 08:56
  • Thak you for your replay I am trying to add this to ini , but nothing has change [client] default-character-set = utf8mb4 [mysqld] character-set-server = utf8mb4 collation-server = utf8mb4_unicode_ci [mysql] default-character-set = utf8mb4 – Oğuzhan Aydın Oct 27 '21 at 09:04
  • *I am trying to add this to ini* Changes made in INI file will be applied during the next MySQL server start. But I strongly recommend you to backup everything (including system and service databases) before this restarting... – Akina Oct 27 '21 at 09:29
  • I am very glad for your interest, when i add this to conf file [client] default-character-set=utf8mb4 [mysql] default-character-set=utf8mb4 [mysqld] character-set-server = utf8mb4 nothing has changed and the character_set_system is still utf8 . If you succed to change it could you please provide how can you do this. Thank you – Oğuzhan Aydın Oct 27 '21 at 11:01

1 Answers1

0

The title is incorrectly phrased.

"utf8" is a "character set"

"utf8_bin" is a "collation" for the character set utf8.

You cannot change character_set... to collation. You may be able to set some of the collation_% entries to utf8_bin.

But none of that a valid solution for the problem you proceed to discuss.

Probably you can find more tips here: Trouble with UTF-8 characters; what I see is not what I stored

To help you further, we need to see the symptoms that got you started down this wrong path.

Rick James
  • 135,179
  • 13
  • 127
  • 222