하트위키
최근 변경
최근 토론
임의 문서
도구
최근 변경
MongoDB
(r12 문단 편집)
[오류!]
편집 권한이 부족합니다. 로그인된 사용자(이)여야 합니다. 해당 문서의
ACL 탭
을 확인하시기 바랍니다.
닫기
RAW 편집
=== 설치 후 최초 설정 === *{{{#FC457A 아래 내용은 mongoDB 8버전대 기준으로 설명함.}}} *mongosh 명령어로 mongoDB CLI 환경 진입 *db.createUser를 통해 admin ID 생성 *예시 {{{db.createUser( { user: "kskim", pwd: passwordPrompt(), roles: [ { role: "userAdminAnyDatabase", db: "admin" }, { role: "readWriteAnyDatabase", db: "admin" } ] } ) }}} *이후 admin ID를 통해 다른 사용자 ID나 추가 작업 수행 *예시 >{{{#FC457A #}}}mongosh >Current Mongosh Log ID: 67f745b38d50f7b8b9d861df >Connecting to: mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&>appName=mongosh+2.5.0 >Using MongoDB: 8.0.6 >Using Mongosh: 2.5.0 > >For mongosh info see: https://www.mongodb.com/docs/mongodb-shell/ > > >To help improve our products, anonymous usage data is collected and sent to MongoDB periodically (https://www.mongodb.com/legal/privacy-policy). >You can opt-out by running the disableTelemetry() command. > >------ > The server generated these startup warnings when booting > 2025-04-10T02:35:54.496+00:00: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine. See http://dochub.mongodb.org/core/prodnotes-filesystem > 2025-04-10T02:35:56.152+00:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted > 2025-04-10T02:35:56.155+00:00: You are running on a NUMA machine. We suggest launching mongod like this to avoid performance problems: numactl --interleave=all mongod [other options] > 2025-04-10T02:35:56.156+00:00: For customers running the current memory allocator, we suggest changing the contents of the following sysfsFile > 2025-04-10T02:35:56.156+00:00: For customers running the current memory allocator, we suggest changing the contents of the following sysfsFile > 2025-04-10T02:35:56.156+00:00: We suggest setting the contents of sysfsFile to 0. > 2025-04-10T02:35:56.156+00:00: We suggest setting swappiness to 0 or 1, as swapping can cause performance problems. >------ > >{{{#FC457A test>}}} use admin >switched to db admin >{{{#FC457A admin>}}} db.createUser( >... { >... user: "kskim", >... pwd: passwordPrompt(), >... roles: [ >... { role: "userAdminAnyDatabase", db: "admin" }, >... { role: "readWriteAnyDatabase", db: "admin" } >... ] >... } >... ) >Enter password >**********{ ok: 1 } >{{{#FC457A admin>}}} exit
Liberty
|
the tree