Database
Mac 운영체제에서 MongoDB 포트 변경 방법
kogun82
2024. 7. 19. 23:55
1.MongoDB 실행 포트 확인하기
lsof -i | grep mongo
2.mongod.conf 위치
macOS Apple silicon: /opt/homebrew/etc/mongod.conf (homebrew 이용하여 mongodb 설치 경우)
macOS Intel chip: /usr/local/etc/mongod.conf
Linux: /etc/mongod.conf
systemLog:
destination: file
path: /opt/homebrew/var/log/mongodb/mongo.log
logAppend: true
storage:
dbPath: /opt/homebrew/var/mongodb
net:
bindIp: 0.0.0.0, ::1
ipv6: true
port: 28018
3. MongoDB 재실행
brew services stop mongodb-community@7.0
brew services start mongodb-community@7.0
반응형