본문 바로가기

mysql5

MySQL database character set 변경 상황 ERROR 1366 (HY000) : incorrect string value : '\xED\x95\x9C\xEA\xB2\x8C...' for column 등과 같은 에러메시지를 보여준다. 이유 Mysql 데이터베이스가 latin1 문자열을 이용하기에 받아들이지 못하는 문자열이 있어 입력 오류가 발생한다. 해결방안 Mysql 기본 charset 변경 MySQL my.cnf 파일찾기을 참고하여 my.cnf 파일을 찾는다. my.cnf 파일에 다음을 추가한다. [mysqld] ... collation-server = utf8mb4_unicode_ci character-set-server = utf8mb4 skip-character-set-client-handshake ... mysql을 .. 2020. 6. 3.
Airflow Exception: Global variable explicit_defaults_for_timestamp needs to be on (1) for mysql 상황 Airflow를 설치하여 mysql과 연동과정에서 $ airflow initdb 명령 수행 중 제목과 같은 에러가 발생하였다. 발생 이유 및 해결 방안 mysql의 explicit_defaults_for_timestamp가 1이어야 한다. my.cnf 파일찾기(링크)의 방법에 따라 my.cnf 파일의 위치를 확인한다. mysqld 하위의 explicit_defaults_for_timestamp를 1로 설정한다. explicit_defaults_for_timestamp 항목이 존재 하지 않을 경우, mysqld 하위에 explicit_defaults_for_timestamp의 설정을 새로 입력한다. [mysqld] ... explicit_defaults_for_timestamp = 1 ... mysq.. 2020. 6. 3.
MySQL mysql Index column size too large the maximum column size is 767 bytes. 상황 mysql Index column size too large the maximum column size is 767 bytes. 와 같은 에러 메시지가 나온다. 인덱스 사이즈가 너무 커서 발생하는 문제이다. 해결방안 MySQL my.cnf 파일 찾기를 참고하여 my.cnf파일을 찾는다. my.cnf 파일의 내용을 다음과 같이 수정한다. [mysqld] ... innodb_file_format=barracuda innodb_large_prefix=on innodb_file_per_table=on ... 추후 테이블을 생성시 ROW_FORMAT=DYNAMIC 를 추가한다. CREATE TABLE `task_fail` ( `id` int(11) NOT NULL AUTO_INCREMENT, `task_id.. 2020. 6. 3.
MySQL my.cnf 파일찾기 상황 mysql의 설정을 바꾸기 위해 my.cnf 파일을 찾아야 하나 설치 방법에 따라 위치가 달라 찾기가 어렵다. 해결방안 mysql 설치 서버에서 다음과 같이 입력한다. $ mysqld --verbose --help | grep -A 1 'Default options' 이 경우 다음과 같은 결과가 나온다. Default options are read from the following files in the given order: /etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf 이들을 차례로 vim 등 에디터를 이용하여 확인한다. 2020. 6. 3.
반응형