error 내용
pymongo.errors.OperationFailure: command find requires authentication, full error: {'ok': 0.0, 'errmsg': 'command find requires authentication', 'code': 13, 'codeName': 'Unauthorized'}
해결 코드
client = MongoClient('mongodb://test:test@localhost/?authSource=admin', 27017)
/?authSource=admin 를 추가하여 해결.
'Development' 카테고리의 다른 글
[html] meta 태그 og 설정 (0) | 2022.01.07 |
---|---|
[terminal] 사용 중인 특정 포트 종료하기 (0) | 2022.01.07 |
[토이프로젝트] '마이 마운틴'에서 구현한 기능들 (0) | 2022.01.06 |
[토이프로젝트] 다녀온 산들을 저장하고 후기를 남기는 사이트 (0) | 2022.01.05 |
[html] og 태그 기본 코드 (0) | 2022.01.02 |