더북(TheBook)

12. 오류 메시지로 구글에서 검색해 보니, 데이터베이스가 InnoDB라서 인덱스 제약 사항에 걸렸다고 알려 줍니다. euckr은 2바이트, utf8은 3바이트, utf8mb4는 4바이트로 계산해야 합니다. 그럼 현재 설치된 데이터베이스의 status를 확인해 보겠습니다. 확인해 보니 characterset이 utf8mb4로 설정되어 있습니다.

root@controller:~# mysql -u root -popenstack
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 34
Server version: 10.0.24-MariaDB-7 Ubuntu 16.04

Copyright © 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

MariaDB [(none)]> status;

mysql Ver 15.1 Distrib 10.0.24-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

Connection id: 34 Current database:
Current user: root@localhost SSL: Not in use Current pager: stdout Using outfile: “ Using delimiter: ; Server: MariaDB Server version: 10.0.24-MariaDB-7 Ubuntu 16.04 Protocol version: 10 Connection: Localhost via UNIX socket Server characterset: utf8mb4 Db characterset: utf8mb4 Client characterset: utf8mb4 Conn. characterset: utf8mb4 UNIX socket: /var/run/mysqld/mysqld.sock Uptime: 3 min 37 sec

Threads: 1 Questions: 120 Slow queries: 0 Opens: 15 Flush tables: 1 Open

tables: 78 Queries per second avg: 0.552

MariaDB [(none)]> exit;

신간 소식 구독하기
뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.