인프런 커뮤니티 질문&답변

Moa Kim님의 프로필 이미지

작성한 질문수

[리뉴얼] React로 NodeBird SNS 만들기

우분투 mysql 계속 5.7로만 설치됩니다.

해결된 질문

작성

·

1K

0

AWS 배포부분에서 우분투에 MYSQL 설치하기 따라하고 있습니다.

동일하게 아마존 AWS로 했고 우분투 버전은

  Operating System: Ubuntu 18.04.6 LTS

            Kernel: Linux 5.4.0-1060-aws

      Architecture: x86-64

이렇게 나오네요.

중간에 sudo update할때 PUBKEY 오류가 나서 https://comcube.tistory.com/entry/Ubuntu-%EC%97%90%EC%84%9C-GPG-ERROR-NOPUBKEY-%EC%97%90%EB%9F%AC%EC%8B%9C-%ED%95%B4%EA%B2%B0%EB%B0%A9%EB%B2%95

위 블로그를 보고 해결한 상태입니다.

 

알려주신 사이트 외에 몇개 다른 블로그글 참고해서 설치 시도중인데

계속 버전이 5.7만 뜨네요.. 

 

ubuntu@ip-172-31-36-77:~/excuse-moa/back$ wget -c https://repo.mysql.com/mysql-apt-config_0.8.13-1_all.deb 

--2022-01-20 08:30:14--  https://repo.mysql.com/mysql-apt-config_0.8.13-1_all.deb

Resolving repo.mysql.com (repo.mysql.com)... 23.205.96.240

Connecting to repo.mysql.com (repo.mysql.com)|23.205.96.240|:443... connected.

HTTP request sent, awaiting response... 200 OK

Length: 35560 (35K) [application/x-debian-package]

Saving to: ‘mysql-apt-config_0.8.13-1_all.deb’

 

mysql-apt-config_0.8.13-1_ 100%[========================================>]  34.73K  --.-KB/s    in 0.03s   

 

2022-01-20 08:30:14 (1.03 MB/s) - ‘mysql-apt-config_0.8.13-1_all.deb’ saved [35560/35560]

 

ubuntu@ip-172-31-36-77:~/excuse-moa/back$ sudo dpkg -i mysql-apt-config_0.8.13-1_all.deb 

(Reading database ... 69208 files and directories currently installed.)

Preparing to unpack mysql-apt-config_0.8.13-1_all.deb ...

Unpacking mysql-apt-config (0.8.13-1) over (0.8.13-1) ...

Setting up mysql-apt-config (0.8.13-1) ...

Warning: apt-key should not be used in scripts (called from postinst maintainerscript of the package mysql-apt-config)

OK

ubuntu@ip-172-31-36-77:~/excuse-moa/back$ sudo apt update

Hit:1 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic InRelease

Hit:2 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-updates InRelease

Get:3 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]

Hit:4 https://deb.nodesource.com/node_14.x bionic InRelease

Hit:5 http://repo.mysql.com/apt/ubuntu bionic InRelease

Hit:6 http://security.ubuntu.com/ubuntu bionic-security InRelease

Fetched 74.6 kB in 1s (88.4 kB/s)

Reading package lists... Done

Building dependency tree       

Reading state information... Done

24 packages can be upgraded. Run 'apt list --upgradable' to see them.

ubuntu@ip-172-31-36-77:~/excuse-moa/back$ sudo apt-get install mysql-server

Reading package lists... Done

Building dependency tree

Reading state information... Done

The following packages were automatically installed and are no longer required:

  libcgi-fast-perl libcgi-pm-perl libencode-locale-perl libevent-core-2.1-6 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

Use 'sudo apt autoremove' to remove them.

The following additional packages will be installed:

  libmecab2 mysql-client mysql-common mysql-community-client mysql-community-server

The following packages will be REMOVED:

  mysql-client-core-5.7 mysql-server-core-5.7

The following NEW packages will be installed:

  libmecab2 mysql-client mysql-common mysql-community-client mysql-community-server mysql-server

0 upgraded, 6 newly installed, 2 to remove and 24 not upgraded.

Need to get 51.5 MB/51.5 MB of archives.

After this operation, 240 MB of additional disk space will be used.

Do you want to continue? [Y/n] y

Get:1 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu bionic/universe amd64 libmecab2 amd64 0.996-5 [257 kB]

Get:2 http://repo.mysql.com/apt/ubuntu bionic/mysql-5.7 amd64 mysql-community-client amd64 5.7.37-1ubuntu18.04 [14.6 MB]

Get:3 http://repo.mysql.com/apt/ubuntu bionic/mysql-5.7 amd64 mysql-client amd64 5.7.37-1ubuntu18.04 [70.3 

kB]

Get:4 http://repo.mysql.com/apt/ubuntu bionic/mysql-5.7 amd64 mysql-community-server amd64 5.7.37-1ubuntu18.04 [36.5 MB]

Get:5 http://repo.mysql.com/apt/ubuntu bionic/mysql-5.7 amd64 mysql-server amd64 5.7.37-1ubuntu18.04 [70.3 

kB]

Fetched 51.5 MB in 2s (23.0 MB/s)

Preconfiguring packages ...

(Reading database ... 69208 files and directories currently installed.)

Removing mysql-client-core-5.7 (5.7.36-0ubuntu0.18.04.1) ...

Removing mysql-server-core-5.7 (5.7.36-0ubuntu0.18.04.1) ...

Selecting previously unselected package mysql-common.

(Reading database ... 69100 files and directories currently installed.)

Preparing to unpack .../0-mysql-common_5.8+1.0.4_all.deb ...

Unpacking mysql-common (5.8+1.0.4) ...

Selecting previously unselected package mysql-community-client.

Preparing to unpack .../1-mysql-community-client_5.7.37-1ubuntu18.04_amd64.deb ...

Unpacking mysql-community-client (5.7.37-1ubuntu18.04) ...

Selecting previously unselected package mysql-client.

Preparing to unpack .../2-mysql-client_5.7.37-1ubuntu18.04_amd64.deb ...

Unpacking mysql-client (5.7.37-1ubuntu18.04) ...

Selecting previously unselected package libmecab2:amd64.

Preparing to unpack .../3-libmecab2_0.996-5_amd64.deb ...

Unpacking libmecab2:amd64 (0.996-5) ...

Selecting previously unselected package mysql-community-server.

Preparing to unpack .../4-mysql-community-server_5.7.37-1ubuntu18.04_amd64.deb ...

Unpacking mysql-community-server (5.7.37-1ubuntu18.04) ...

Selecting previously unselected package mysql-server.

Preparing to unpack .../5-mysql-server_5.7.37-1ubuntu18.04_amd64.deb ...

Unpacking mysql-server (5.7.37-1ubuntu18.04) ...

Setting up mysql-common (5.8+1.0.4) ...

update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode

Setting up libmecab2:amd64 (0.996-5) ...

Setting up mysql-community-client (5.7.37-1ubuntu18.04) ...

Setting up mysql-client (5.7.37-1ubuntu18.04) ...

Setting up mysql-community-server (5.7.37-1ubuntu18.04) ...

update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode

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

Setting up mysql-server (5.7.37-1ubuntu18.04) ...

Processing triggers for libc-bin (2.27-3ubuntu1.4) ...

Processing triggers for systemd (237-3ubuntu10.52) ...

Processing triggers for man-db (2.8.3-2ubuntu0.1) ...

Processing triggers for ureadahead (0.100.0-21) ...

답변 1

0

Moa Kim님의 프로필 이미지
Moa Kim
질문자

자문 자답입니다.

 

 

https://www.inflearn.com/questions/41022

 

기존 mysql 5.7 깔린게 안지워져서 그런것같은데

 

ls로 파일목록보고 mysql-apt-config_0.8.12-1_all.deb가 있으면

sudo rm mysql-apt-config_0.8.12-1_all.deb

으로 지운 후에

sudo apt-get remove mysql-server

로 mysql 지워주고

위 링크안의 링크글 따라들어가서 명령어 따라치니 MYSQL 8로 설치가 되네요.

덕분에 해결했습니다 감사합니다!

Moa Kim님의 프로필 이미지

작성한 질문수

질문하기