코딩 요정 버터링

Ubuntu server에서 MySql 설치하기 본문

우분투...

Ubuntu server에서 MySql 설치하기

butter-ring 2020. 1. 1. 21:21

버추어박스에 ubuntu 서버를 설치, 그 후 ssh 접속 하여 MySql을 설치해보자

일단 버추얼머신에 서버를 띄운 후 맥 터미널을 연다.  

$ ssh [계정명]@[접속할 서버 ip주소]

  

위의 명령어를 입력하면 비밀번호를 설정했을경우 입력하라고 뜬다. 비밀번호 성공적으로 입력해서 접속이 가능하면 밑의 화면이 뜬다.  

ECDSA key fingerprint is SHA256:QYD61+AImLDw+5BDfmDBja7gGjHm4SuFlUHBmezZScc.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.56.101' (ECDSA) to the list of known hosts.
jane@192.168.56.101's password: 
Welcome to Ubuntu 18.04.3 LTS (GNU/Linux 4.15.0-72-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Wed Jan  1 11:50:02 UTC 2020

  System load:  0.0               Processes:             87
  Usage of /:   39.5% of 9.78GB   Users logged in:       1
  Memory usage: 15%               IP address for enp0s3: 10.0.2.15
  Swap usage:   0%                IP address for enp0s8: 192.168.56.101


0 packages can be updated.
0 updates are security updates.


Last login: Wed Jan  1 09:52:12 2020
jane@jane:~$ 

  

성공적으로 접속이 되었다.

이제 우리는 터미널에 복붙이 가능하다. 살았다. 본격적으로 MySql을 설치해보자.

일단 우분투 서버를 업데이트 해보자  

sudo apt-get update

  

그 후 아래 명령어를 통해 mysql을 설치  

sudo apt-get install mysql-server

  

설치 후 설정을 해준다.  

sudo mysql_secure_installation

  

모든걸 완료 한 후 mysql을 실행  

sudo mysql -u root -p
Comments