mysql character set 변경

BackEnd_Ash.log·2020년 6월 26일
0

https://qastack.kr/dba/8239/how-to-easily-convert-utf8-tables-to-utf8mb4-in-mysql-5-5

If you do make file name Korean when you upload a file

You may see an error

example )

django.db.utils.OperationalError: (1267, "Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation '='")

default character set

if you make database default

create database [database_name]

maybe you see character set labin1

if you want character set utf8

if you want character set utf8
you have to alter table or alter database

alter database

MariaDB [K__INFO]> alter database
    -> data_base
    -> character set = utf8mb4
    -> collate = utf8mb4_unicode_ci;

alter table

MariaDB [K__INFO]> alter table
    -> accounts
    -> convert to character set utf8mb4
    -> collate utf8mb4_unicode_ci;

and you can see your table status

show table status
profile
꾸준함이란 ... ?

0개의 댓글