티스토리 뷰

 

블로그의 서버 환경

 

- Ubuntu 16.04.6 LTS

- AWS EC2

- mysql apt-get으로 설치 (sudo apt-get install mysql-server)

 

 

 

mysql 5.5 버전 이상 

 

sudo vi /etc/mysql/my.cnf

 

맨밑에 아래 문구를 추가

[mysqld]
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
skip-character-set-client-handshake

 

서버 재시작

sudo service mysql restart

 

변경된 상태 확인

ubuntu@localhost:~$ sudo mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.7.28-0ubuntu0.16.04.2 (Ubuntu)

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

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

mysql> status
--------------
mysql  Ver 14.14 Distrib 5.7.28, for Linux (x86_64) using  EditLine wrapper

Connection id:          5
Current database:
Current user:           root@localhost
SSL:                    Not in use
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server version:         5.7.28-0ubuntu0.16.04.2 (Ubuntu)
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:                 1 min 11 sec

Threads: 2  Questions: 28  Slow queries: 0  Opens: 108  Flush tables: 1  Open tables: 27  Queries per second avg: 0.394
--------------

 

'개발 > Databse - MySql' 카테고리의 다른 글

[mysql] 설치 버전 확인하기  (0) 2019.12.26
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함