- Today
- Total
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- MariaDB
- typescript
- sql
- 아고라스테이츠
- javascript
- 리팩터링 2판
- Refactoring
- CRUD
- java
- TIL
- First Project
- 코딩테스트
- TWIL
- 배포
- Git
- LEVEL1
- 알고리즘
- Docker
- LEVEL 2
- 프로그래머스
- 오늘도 개발자가 안된다고 말했다
- CSS
- 면접을 위한 cs 전공지식 노트
- 코어 자바스크립트
- LEVEL 1
- react
- mongodb
- TMIL
- 에러핸들링
- Err-Handling
성장에 목마른 코린이
[DB] MariaDB 설치, 세팅, 접속 (Mac) 본문
1. MariaDB 설치 (Mac)
brew install mariadb
mariadb 실행 및 중지
실행 : brew services start mariadb
중지 : brew services stop mariadb
mariadb를 동작하는지 확인
brew services list
2. MariaDB root 계정 생성
Mysql과 마찬가지로 MariaDB도 설치하였다면 관리자 계정인 root 계정을 설정해야합니다.
sudo mariadb-secure-installation
1. 자신의 Mac Password를 입력하면 됩니다.
2. MariaDB 세팅
중간에 패스워드는 입력안하면 다시 sudo mariadb-secure-installation 해야합니다.
저같은 경우엔 처음에 n 눌러서 세팅하고나니 접속이 안되더라고요.
(OK, successfully used password, moving on...
Setting the root password or using the unix_socket ensures that nobody
can log into the MariaDB root user without the proper authorisation.
You already have your root account protected, so you can safely answer 'n'.
Switch to unix_socket authentication [Y/n] n
... skipping.
You already have your root account protected, so you can safely answer 'n'.
Change the root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB 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? [Y/n] 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? [Y/n] n
... skipping.
By default, MariaDB 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? [Y/n] 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? [Y/n] y
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!
3. MariaDB root 계정에 접속
// mariadb는 mysql이랑 자매 데이터베이스라 이렇게 들어가면됩니다.
mysql -u root -p
입력 하셨으면, 2번에서 입력하셨던 password 입력해주시면 됩니다.
password입력 안하셨으면 접속 안되니 다시 2번 따라해주세요.