리눅스 서버 TIP

ubuntu 20.04 MYSQL 설치하는 방법

작성자 정보

  • 작성자 Becain
  • 작성일

컨텐츠 정보

본문

ubuntu 20.04 에 mysql 설치 하는 방법입니다. 

직접 설치한 output 긁어 보았습니다. 

참고하세요.

매우 간단하네요. ^^

 

root@namgyeong-t440s:/var/www/html# apt-get install mysql-server

패키지 목록을 읽는 중입니다... 완료

의존성 트리를 만드는 중입니다       

상태 정보를 읽는 중입니다... 완료

다음 패키지가 자동으로 설치되었지만 더 이상 필요하지 않습니다:

  libfprint-2-tod1 libllvm9 libllvm9:i386 libplymouth5 linux-headers-5.4.0-42 linux-headers-5.4.0-42-generic linux-image-5.4.0-42-generic linux-modules-5.4.0-42-generic

  linux-modules-extra-5.4.0-42-generic

'apt autoremove'를 이용하여 제거하십시오.

다음의 추가 패키지가 설치될 것입니다 :

  libaio1 libevent-core-2.1-7 libhtml-template-perl libmecab2 mecab-ipadic mecab-ipadic-utf8 mecab-utils mysql-client-8.0 mysql-client-core-8.0 mysql-server-8.0

  mysql-server-core-8.0

제안하는 패키지:

  libipc-sharedcache-perl mailx tinyca

다음 새 패키지를 설치할 것입니다:

  libaio1 libevent-core-2.1-7 libhtml-template-perl libmecab2 mecab-ipadic mecab-ipadic-utf8 mecab-utils mysql-client-8.0 mysql-client-core-8.0 mysql-server

  mysql-server-8.0 mysql-server-core-8.0

0개 업그레이드, 12개 새로 설치, 0개 제거 및 12개 업그레이드 안 함.

30.0 M바이트 아카이브를 받아야 합니다.

이 작업 후 246 M바이트의 디스크 공간을 더 사용하게 됩니다.

계속 하시겠습니까? [Y/n] y

받기:1 http://kr.archive.ubuntu.com/ubuntu focal-updates/main amd64 mysql-client-core-8.0 amd64 8.0.21-0ubuntu0.20.04.4 [4,207 kB]

받기:2 http://kr.archive.ubuntu.com/ubuntu focal-updates/main amd64 mysql-client-8.0 amd64 8.0.21-0ubuntu0.20.04.4 [22.0 kB]                      

받기:3 http://kr.archive.ubuntu.com/ubuntu focal/main amd64 libaio1 amd64 0.3.112-5 [7,184 B]  

받기:4 http://kr.archive.ubuntu.com/ubuntu focal/main amd64 libevent-core-2.1-7 amd64 2.1.11-stable-1 [89.1 kB]    

받기:5 http://kr.archive.ubuntu.com/ubuntu focal/main amd64 libmecab2 amd64 0.996-10build1 [233 kB]                                                                         

받기:6 http://kr.archive.ubuntu.com/ubuntu focal-updates/main amd64 mysql-server-core-8.0 amd64 8.0.21-0ubuntu0.20.04.4 [17.4 MB]  

받기:7 http://kr.archive.ubuntu.com/ubuntu focal-updates/main amd64 mysql-server-8.0 amd64 8.0.21-0ubuntu0.20.04.4 [1,249 kB]       

받기:8 http://kr.archive.ubuntu.com/ubuntu focal/main amd64 libhtml-template-perl all 2.97-1 [59.0 kB]                                                                      

받기:9 http://kr.archive.ubuntu.com/ubuntu focal/main amd64 mecab-utils amd64 0.996-10build1 [4,912 B]                                                       

받기:10 http://kr.archive.ubuntu.com/ubuntu focal/main amd64 mecab-ipadic all 2.7.0-20070801+main-2.1 [6,714 kB]                                   

받기:11 http://kr.archive.ubuntu.com/ubuntu focal/main amd64 mecab-ipadic-utf8 all 2.7.0-20070801+main-2.1 [4,380 B]                           

받기:12 http://kr.archive.ubuntu.com/ubuntu focal-updates/main amd64 mysql-server all 8.0.21-0ubuntu0.20.04.4 [9,552 B]                                                     

내려받기 30.0 M바이트, 소요시간 26초 (1,167 k바이트/초)                                                                                                                     

패키지를 미리 설정하는 중입니다...

Selecting previously unselected package mysql-client-core-8.0.

(데이터베이스 읽는중 ...현재 421906개의 파일과 디렉터리가 설치되어 있습니다.)

Preparing to unpack .../00-mysql-client-core-8.0_8.0.21-0ubuntu0.20.04.4_amd64.deb ...

Unpacking mysql-client-core-8.0 (8.0.21-0ubuntu0.20.04.4) ...

Selecting previously unselected package mysql-client-8.0.

Preparing to unpack .../01-mysql-client-8.0_8.0.21-0ubuntu0.20.04.4_amd64.deb ...

Unpacking mysql-client-8.0 (8.0.21-0ubuntu0.20.04.4) ...

Selecting previously unselected package libaio1:amd64.

Preparing to unpack .../02-libaio1_0.3.112-5_amd64.deb ...

Unpacking libaio1:amd64 (0.3.112-5) ...

Selecting previously unselected package libevent-core-2.1-7:amd64.

Preparing to unpack .../03-libevent-core-2.1-7_2.1.11-stable-1_amd64.deb ...

Unpacking libevent-core-2.1-7:amd64 (2.1.11-stable-1) ...

Selecting previously unselected package libmecab2:amd64.

Preparing to unpack .../04-libmecab2_0.996-10build1_amd64.deb ...

Unpacking libmecab2:amd64 (0.996-10build1) ...

Selecting previously unselected package mysql-server-core-8.0.

Preparing to unpack .../05-mysql-server-core-8.0_8.0.21-0ubuntu0.20.04.4_amd64.deb ...

Unpacking mysql-server-core-8.0 (8.0.21-0ubuntu0.20.04.4) ...

Selecting previously unselected package mysql-server-8.0.

Preparing to unpack .../06-mysql-server-8.0_8.0.21-0ubuntu0.20.04.4_amd64.deb ...

Unpacking mysql-server-8.0 (8.0.21-0ubuntu0.20.04.4) ...

Selecting previously unselected package libhtml-template-perl.

Preparing to unpack .../07-libhtml-template-perl_2.97-1_all.deb ...

Unpacking libhtml-template-perl (2.97-1) ...

Selecting previously unselected package mecab-utils.

Preparing to unpack .../08-mecab-utils_0.996-10build1_amd64.deb ...

Unpacking mecab-utils (0.996-10build1) ...

Selecting previously unselected package mecab-ipadic.

Preparing to unpack .../09-mecab-ipadic_2.7.0-20070801+main-2.1_all.deb ...

Unpacking mecab-ipadic (2.7.0-20070801+main-2.1) ...

Selecting previously unselected package mecab-ipadic-utf8.

Preparing to unpack .../10-mecab-ipadic-utf8_2.7.0-20070801+main-2.1_all.deb ...

Unpacking mecab-ipadic-utf8 (2.7.0-20070801+main-2.1) ...

Selecting previously unselected package mysql-server.

Preparing to unpack .../11-mysql-server_8.0.21-0ubuntu0.20.04.4_all.deb ...

Unpacking mysql-server (8.0.21-0ubuntu0.20.04.4) ...

libmecab2:amd64 (0.996-10build1) 설정하는 중입니다 ...

mysql-client-core-8.0 (8.0.21-0ubuntu0.20.04.4) 설정하는 중입니다 ...

libhtml-template-perl (2.97-1) 설정하는 중입니다 ...

mecab-utils (0.996-10build1) 설정하는 중입니다 ...

libevent-core-2.1-7:amd64 (2.1.11-stable-1) 설정하는 중입니다 ...

mysql-client-8.0 (8.0.21-0ubuntu0.20.04.4) 설정하는 중입니다 ...

libaio1:amd64 (0.3.112-5) 설정하는 중입니다 ...

mecab-ipadic (2.7.0-20070801+main-2.1) 설정하는 중입니다 ...

Compiling IPA dictionary for Mecab.  This takes long time...

reading /usr/share/mecab/dic/ipadic/unk.def ... 40

emitting double-array: 100% |###########################################| 

/usr/share/mecab/dic/ipadic/model.def is not found. skipped.

reading /usr/share/mecab/dic/ipadic/Noun.proper.csv ... 27328

reading /usr/share/mecab/dic/ipadic/Noun.nai.csv ... 42

reading /usr/share/mecab/dic/ipadic/Symbol.csv ... 208

reading /usr/share/mecab/dic/ipadic/Filler.csv ... 19

reading /usr/share/mecab/dic/ipadic/Noun.org.csv ... 16668

reading /usr/share/mecab/dic/ipadic/Noun.verbal.csv ... 12146

reading /usr/share/mecab/dic/ipadic/Noun.demonst.csv ... 120

reading /usr/share/mecab/dic/ipadic/Conjunction.csv ... 171

reading /usr/share/mecab/dic/ipadic/Verb.csv ... 130750

reading /usr/share/mecab/dic/ipadic/Auxil.csv ... 199

reading /usr/share/mecab/dic/ipadic/Interjection.csv ... 252

reading /usr/share/mecab/dic/ipadic/Noun.name.csv ... 34202

reading /usr/share/mecab/dic/ipadic/Adnominal.csv ... 135

reading /usr/share/mecab/dic/ipadic/Noun.others.csv ... 151

reading /usr/share/mecab/dic/ipadic/Noun.place.csv ... 72999

reading /usr/share/mecab/dic/ipadic/Postp-col.csv ... 91

reading /usr/share/mecab/dic/ipadic/Postp.csv ... 146

reading /usr/share/mecab/dic/ipadic/Others.csv ... 2

reading /usr/share/mecab/dic/ipadic/Adverb.csv ... 3032

reading /usr/share/mecab/dic/ipadic/Noun.adjv.csv ... 3328

reading /usr/share/mecab/dic/ipadic/Adj.csv ... 27210

reading /usr/share/mecab/dic/ipadic/Noun.adverbal.csv ... 795

reading /usr/share/mecab/dic/ipadic/Suffix.csv ... 1393

reading /usr/share/mecab/dic/ipadic/Noun.number.csv ... 42

reading /usr/share/mecab/dic/ipadic/Prefix.csv ... 221

reading /usr/share/mecab/dic/ipadic/Noun.csv ... 60477

emitting double-array: 100% |###########################################| 

reading /usr/share/mecab/dic/ipadic/matrix.def ... 1316x1316

emitting matrix      : 100% |###########################################| 


done!

update-alternatives: using /var/lib/mecab/dic/ipadic to provide /var/lib/mecab/dic/debian (mecab-dictionary) in auto mode

mysql-server-core-8.0 (8.0.21-0ubuntu0.20.04.4) 설정하는 중입니다 ...

mecab-ipadic-utf8 (2.7.0-20070801+main-2.1) 설정하는 중입니다 ...

Compiling IPA dictionary for Mecab.  This takes long time...

reading /usr/share/mecab/dic/ipadic/unk.def ... 40

emitting double-array: 100% |###########################################| 

/usr/share/mecab/dic/ipadic/model.def is not found. skipped.

reading /usr/share/mecab/dic/ipadic/Noun.proper.csv ... 27328

reading /usr/share/mecab/dic/ipadic/Noun.nai.csv ... 42

reading /usr/share/mecab/dic/ipadic/Symbol.csv ... 208

reading /usr/share/mecab/dic/ipadic/Filler.csv ... 19

reading /usr/share/mecab/dic/ipadic/Noun.org.csv ... 16668

reading /usr/share/mecab/dic/ipadic/Noun.verbal.csv ... 12146

reading /usr/share/mecab/dic/ipadic/Noun.demonst.csv ... 120

reading /usr/share/mecab/dic/ipadic/Conjunction.csv ... 171

reading /usr/share/mecab/dic/ipadic/Verb.csv ... 130750

reading /usr/share/mecab/dic/ipadic/Auxil.csv ... 199

reading /usr/share/mecab/dic/ipadic/Interjection.csv ... 252

reading /usr/share/mecab/dic/ipadic/Noun.name.csv ... 34202

reading /usr/share/mecab/dic/ipadic/Adnominal.csv ... 135

reading /usr/share/mecab/dic/ipadic/Noun.others.csv ... 151

reading /usr/share/mecab/dic/ipadic/Noun.place.csv ... 72999

reading /usr/share/mecab/dic/ipadic/Postp-col.csv ... 91

reading /usr/share/mecab/dic/ipadic/Postp.csv ... 146

reading /usr/share/mecab/dic/ipadic/Others.csv ... 2

reading /usr/share/mecab/dic/ipadic/Adverb.csv ... 3032

reading /usr/share/mecab/dic/ipadic/Noun.adjv.csv ... 3328

reading /usr/share/mecab/dic/ipadic/Adj.csv ... 27210

reading /usr/share/mecab/dic/ipadic/Noun.adverbal.csv ... 795

reading /usr/share/mecab/dic/ipadic/Suffix.csv ... 1393

reading /usr/share/mecab/dic/ipadic/Noun.number.csv ... 42

reading /usr/share/mecab/dic/ipadic/Prefix.csv ... 221

reading /usr/share/mecab/dic/ipadic/Noun.csv ... 60477

emitting double-array: 100% |###########################################| 

reading /usr/share/mecab/dic/ipadic/matrix.def ... 1316x1316

emitting matrix      : 100% |###########################################| 


done!

update-alternatives: using /var/lib/mecab/dic/ipadic-utf8 to provide /var/lib/mecab/dic/debian (mecab-dictionary) in auto mode

mysql-server-8.0 (8.0.21-0ubuntu0.20.04.4) 설정하는 중입니다 ...

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)


mysqld will log errors to /var/log/mysql/error.log

mysqld is running as pid 26925

Created symlink /etc/systemd/system/multi-user.target.wants/mysql.service → /lib/systemd/system/mysql.service.

mysql-server (8.0.21-0ubuntu0.20.04.4) 설정하는 중입니다 ...

Processing triggers for systemd (245.4-4ubuntu3.2) ...

Processing triggers for man-db (2.9.1-1) ...

Processing triggers for libc-bin (2.31-0ubuntu9) ...

root@namgyeong-t440s:/var/www/html# mysql_secure_installation


Securing the MySQL server deployment.


Connecting to MySQL using a blank password.


VALIDATE PASSWORD COMPONENT can be used to test passwords

and improve security. It checks the strength of password

and allows the users to set only those passwords which are

secure enough. Would you like to setup VALIDATE PASSWORD component?


Press y|Y for Yes, any other key for No: y


There are three levels of password validation policy:


LOW    Length >= 8

MEDIUM Length >= 8, numeric, mixed case, and special characters

STRONG Length >= 8, numeric, mixed case, special characters and dictionary                  file


Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 1

Please set the password for root here.


New password: 


Re-enter new password: 

Sorry, passwords do not match.


New password: 


Re-enter new password: 


Estimated strength of the password: 100 

Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y

By default, a MySQL installation has an anonymous user,

allowing anyone to log into MySQL without having to have

a user account created for them. This is intended only for

testing, and to make the installation go a bit smoother.

You should remove them before moving into a production

environment.


Remove anonymous users? (Press y|Y for Yes, any other key for No) : y

Success.



Normally, root should only be allowed to connect from

'localhost'. This ensures that someone cannot guess at

the root password from the network.


Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y

Success.


By default, MySQL comes with a database named 'test' that

anyone can access. This is also intended only for testing,

and should be removed before moving into a production

environment.



Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y

 - Dropping test database...

Success.


 - Removing privileges on test database...

Success.


Reloading the privilege tables will ensure that all changes

made so far will take effect immediately.


Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y

Success.


All done! 

root@namgyeong-t440s:/var/www/html# mysql -u root -p

Enter password: 

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 10

Server version: 8.0.21-0ubuntu0.20.04.4 (Ubuntu)


Copyright (c) 2000, 2020, 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> quit

Bye


관련자료

댓글 0
등록된 댓글이 없습니다.

공지글


동영상


최근글


새댓글


포인트 랭킹


COUNT


오늘
72
어제
111
최대
186
전체
14,609