1.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # apt-get update Hit:1 http://kr.archive.ubuntu.com/ubuntu xenial InRelease Get:2 http://kr.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB] Get:3 http://kr.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB] Get:4 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [799 kB] Get:5 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages [731 kB] Get:6 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB] Get:7 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main Translation-en [331 kB] Get:8 http://kr.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [641 kB] Get:9 http://kr.archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages [585 kB] Get:10 http://kr.archive.ubuntu.com/ubuntu xenial-updates/universe Translation-en [257 kB] Get:11 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [516 kB] Get:12 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages [455 kB] Get:13 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en [221 kB] Get:14 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [356 kB] Get:15 http://security.ubuntu.com/ubuntu xenial-security/universe i386 Packages [304 kB] Get:16 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en [133 kB] Fetched 5,652 kB in 3s (1,635 kB/s) Reading package lists... Done | cs |
2.
3.
4.
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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | # apt-get install -y mysql-server Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libaio1 libcgi-fast-perl libcgi-pm-perl libencode-locale-perl libevent-core-2.0-5 libfcgi-perl libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libtimedate-perl liburi-perl mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server-5.7 mysql-server-core-5.7 Suggested packages: libdata-dump-perl libipc-sharedcache-perl libwww-perl mailx tinyca The following NEW packages will be installed: libaio1 libcgi-fast-perl libcgi-pm-perl libencode-locale-perl libevent-core-2.0-5 libfcgi-perl libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libtimedate-perl liburi-perl mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server mysql-server-5.7 mysql-server-core-5.7 0 upgraded, 21 newly installed, 0 to remove and 10 not upgraded. Need to get 18.7 MB of archives. After this operation, 162 MB of additional disk space will be used. Get:1 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-common all 5.7.22-0ubuntu0.16.04.1 [15.4 kB] Get:2 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libaio1 amd64 0.3.110-2 [6,356 B] Get:3 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-client-core-5.7 amd64 5.7.22-0ubuntu0.16.04.1 [6,425 kB] Get:4 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-client-5.7 amd64 5.7.22-0ubuntu0.16.04.1 [1,673 kB] Get:5 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-server-core-5.7 amd64 5.7.22-0ubuntu0.16.04.1 [7,268 kB] Get:6 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libevent-core-2.0-5 amd64 2.0.21-stable-2ubuntu0.16.04.1 [70.6 kB] Get:7 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-server-5.7 amd64 5.7.22-0ubuntu0.16.04.1 [2,583 kB] Get:8 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libhtml-tagset-perl all 3.20-2 [13.5 kB] Get:9 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 liburi-perl all 1.71-1 [76.9 kB] Get:10 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libhtml-parser-perl amd64 3.72-1 [86.1 kB] Get:11 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libcgi-pm-perl all 4.26-1 [185 kB] Get:12 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libfcgi-perl amd64 0.77-1build1 [32.3 kB] Get:13 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libcgi-fast-perl all 1:2.10-1 [10.2 kB] Get:14 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libencode-locale-perl all 1.05-1 [12.3 kB] Get:15 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libhtml-template-perl all 2.95-2 [60.4 kB] Get:16 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libtimedate-perl all 2.3000-2 [37.5 kB] Get:17 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libhttp-date-perl all 6.02-1 [10.4 kB] Get:18 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libio-html-perl all 1.001-1 [14.9 kB] Get:19 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 liblwp-mediatypes-perl all 6.02-1 [21.7 kB] Get:20 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libhttp-message-perl all 6.11-1 [74.3 kB] Get:21 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-server all 5.7.22-0ubuntu0.16.04.1 [10.8 kB] Fetched 18.7 MB in 2s (6,452 kB/s) Preconfiguring packages ... Selecting previously unselected package mysql-common. (Reading database ... 92755 files and directories currently installed.) Preparing to unpack .../mysql-common_5.7.22-0ubuntu0.16.04.1_all.deb ... Unpacking mysql-common (5.7.22-0ubuntu0.16.04.1) ... Selecting previously unselected package libaio1:amd64. Preparing to unpack .../libaio1_0.3.110-2_amd64.deb ... Unpacking libaio1:amd64 (0.3.110-2) ... Selecting previously unselected package mysql-client-core-5.7. Preparing to unpack .../mysql-client-core-5.7_5.7.22-0ubuntu0.16.04.1_amd64.deb ... Unpacking mysql-client-core-5.7 (5.7.22-0ubuntu0.16.04.1) ... Selecting previously unselected package mysql-client-5.7. Preparing to unpack .../mysql-client-5.7_5.7.22-0ubuntu0.16.04.1_amd64.deb ... Unpacking mysql-client-5.7 (5.7.22-0ubuntu0.16.04.1) ... Selecting previously unselected package mysql-server-core-5.7. Preparing to unpack .../mysql-server-core-5.7_5.7.22-0ubuntu0.16.04.1_amd64.deb ... Unpacking mysql-server-core-5.7 (5.7.22-0ubuntu0.16.04.1) ... Selecting previously unselected package libevent-core-2.0-5:amd64. Preparing to unpack .../libevent-core-2.0-5_2.0.21-stable-2ubuntu0.16.04.1_amd64.deb ... Unpacking libevent-core-2.0-5:amd64 (2.0.21-stable-2ubuntu0.16.04.1) ... Processing triggers for libc-bin (2.23-0ubuntu10) ... Processing triggers for man-db (2.7.5-1) ... Setting up mysql-common (5.7.22-0ubuntu0.16.04.1) ... update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode Selecting previously unselected package mysql-server-5.7. (Reading database ... 92923 files and directories currently installed.) Preparing to unpack .../mysql-server-5.7_5.7.22-0ubuntu0.16.04.1_amd64.deb ... Unpacking mysql-server-5.7 (5.7.22-0ubuntu0.16.04.1) ... Selecting previously unselected package libhtml-tagset-perl. Preparing to unpack .../libhtml-tagset-perl_3.20-2_all.deb ... Unpacking libhtml-tagset-perl (3.20-2) ... Selecting previously unselected package liburi-perl. Preparing to unpack .../liburi-perl_1.71-1_all.deb ... Unpacking liburi-perl (1.71-1) ... Selecting previously unselected package libhtml-parser-perl. Preparing to unpack .../libhtml-parser-perl_3.72-1_amd64.deb ... Unpacking libhtml-parser-perl (3.72-1) ... Selecting previously unselected package libcgi-pm-perl. Preparing to unpack .../libcgi-pm-perl_4.26-1_all.deb ... Unpacking libcgi-pm-perl (4.26-1) ... Selecting previously unselected package libfcgi-perl. Preparing to unpack .../libfcgi-perl_0.77-1build1_amd64.deb ... Unpacking libfcgi-perl (0.77-1build1) ... Selecting previously unselected package libcgi-fast-perl. Preparing to unpack .../libcgi-fast-perl_1%3a2.10-1_all.deb ... Unpacking libcgi-fast-perl (1:2.10-1) ... Selecting previously unselected package libencode-locale-perl. Preparing to unpack .../libencode-locale-perl_1.05-1_all.deb ... Unpacking libencode-locale-perl (1.05-1) ... Selecting previously unselected package libhtml-template-perl. Preparing to unpack .../libhtml-template-perl_2.95-2_all.deb ... Unpacking libhtml-template-perl (2.95-2) ... Selecting previously unselected package libtimedate-perl. Preparing to unpack .../libtimedate-perl_2.3000-2_all.deb ... Unpacking libtimedate-perl (2.3000-2) ... Selecting previously unselected package libhttp-date-perl. Preparing to unpack .../libhttp-date-perl_6.02-1_all.deb ... Unpacking libhttp-date-perl (6.02-1) ... Selecting previously unselected package libio-html-perl. Preparing to unpack .../libio-html-perl_1.001-1_all.deb ... Unpacking libio-html-perl (1.001-1) ... Selecting previously unselected package liblwp-mediatypes-perl. Preparing to unpack .../liblwp-mediatypes-perl_6.02-1_all.deb ... Unpacking liblwp-mediatypes-perl (6.02-1) ... Selecting previously unselected package libhttp-message-perl. Preparing to unpack .../libhttp-message-perl_6.11-1_all.deb ... Unpacking libhttp-message-perl (6.11-1) ... Selecting previously unselected package mysql-server. Preparing to unpack .../mysql-server_5.7.22-0ubuntu0.16.04.1_all.deb ... Unpacking mysql-server (5.7.22-0ubuntu0.16.04.1) ... Processing triggers for man-db (2.7.5-1) ... Processing triggers for ureadahead (0.100.0-19) ... Processing triggers for systemd (229-4ubuntu21.2) ... Setting up libaio1:amd64 (0.3.110-2) ... Setting up mysql-client-core-5.7 (5.7.22-0ubuntu0.16.04.1) ... Setting up mysql-client-5.7 (5.7.22-0ubuntu0.16.04.1) ... Setting up mysql-server-core-5.7 (5.7.22-0ubuntu0.16.04.1) ... Setting up libevent-core-2.0-5:amd64 (2.0.21-stable-2ubuntu0.16.04.1) ... Setting up mysql-server-5.7 (5.7.22-0ubuntu0.16.04.1) ... update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode Renaming removed key_buffer and myisam-recover options (if present) Setting up libhtml-tagset-perl (3.20-2) ... Setting up liburi-perl (1.71-1) ... Setting up libhtml-parser-perl (3.72-1) ... Setting up libcgi-pm-perl (4.26-1) ... Setting up libfcgi-perl (0.77-1build1) ... Setting up libcgi-fast-perl (1:2.10-1) ... Setting up libencode-locale-perl (1.05-1) ... Setting up libhtml-template-perl (2.95-2) ... Setting up libtimedate-perl (2.3000-2) ... Setting up libhttp-date-perl (6.02-1) ... Setting up libio-html-perl (1.001-1) ... Setting up liblwp-mediatypes-perl (6.02-1) ... Setting up libhttp-message-perl (6.11-1) ... Setting up mysql-server (5.7.22-0ubuntu0.16.04.1) ... Processing triggers for libc-bin (2.23-0ubuntu10) ... Processing triggers for systemd (229-4ubuntu21.2) ... Processing triggers for ureadahead (0.100.0-19) ... | cs |
5.
1 2 3 4 5 6 7 8 | # dpkg --list |grep mysql ii mysql-client-5.7 5.7.22-0ubuntu0.16.04.1 amd64 MySQL database client binaries ii mysql-client-core-5.7 5.7.22-0ubuntu0.16.04.1 amd64 MySQL database core client binaries ii mysql-common 5.7.22-0ubuntu0.16.04.1 all MySQL database common files, e.g. /etc/mysql/my.cnf ii mysql-server 5.7.22-0ubuntu0.16.04.1 all MySQL database server (metapackage depending on the latest version) ii mysql-server-5.7 5.7.22-0ubuntu0.16.04.1 amd64 MySQL database server binaries and system database setup ii mysql-server-core-5.7 5.7.22-0ubuntu0.16.04.1 amd64 MySQL database server binaries | cs |
6.
1 2 3 4 5 6 7 8 9 10 11 | # service mysql status ● mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2018-07-02 22:28:51 KST; 11min ago Main PID: 9288 (mysqld) CGroup: /system.slice/mysql.service └─9288 /usr/sbin/mysqld Jul 02 22:28:50 dbms systemd[1]: Starting MySQL Community Server... Jul 02 22:28:51 dbms systemd[1]: Started MySQL Community Server. | cs |
7. 외부 접속 허용
7-1. my.cnf 편집
1 2 | # vi /etc/mysql/mysql.conf.d/mysqld.cnf | cs |
7-2.
1 2 3 | #bind-address = 127.0.0.1 bind-address = 0.0.0.0 | cs |
8. 접속 확인
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4 Server version: 5.7.22-0ubuntu0.16.04.1 (Ubuntu) Copyright (c) 2000, 2018, 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> | cs |
9.
1 2 3 4 5 6 7 8 9 10 11 | mysql> show databases; +--------------------+ Database | +--------------------+ information_schema | mysql | performance_schema | sys | +--------------------+ 4 rows in set (0.00 sec) | cs |
'Operating System > Linux' 카테고리의 다른 글
ubuntu 18.04 고정 IP 설정 (0) | 2018.10.03 |
---|---|
TensorFlow 설치 및 환경 구축 (0) | 2018.07.18 |
ubuntu mongo db 설치 (0) | 2018.06.18 |
Kali Linux 고정 IP 설정하기 (0) | 2018.06.12 |
CentOS7 고정 IP 설정 (0) | 2018.06.01 |