1. 설정파일 수정

ellord@ellords-Mac-mini etc % vi /usr/local/etc/mongod.conf

 

 

2. bindIp: 127.0.0.1 을 변경

 

0.0.0.0 모든 곳에서 접속

127.0.0.1, 192.168.0.10 : 로컬과 192.168.0.10 에서 접속

 

systemLog:
  destination: file
  path: /usr/local/var/log/mongodb/mongo.log
  logAppend: true
storage:
  dbPath: /usr/local/var/mongodb
net:
  bindIp: 0.0.0.0, ::1
  ipv6: true
~                                                                                        
~                                                                                        
~

 

 

3. mongodb 재시작(중지 & 시작)

ellord@ellords-Mac-mini 57dbBackup % brew services stop mongodb-community@4.4
Stopping `mongodb-community@4.4`... (might take a while)
==> Successfully stopped `mongodb-community@4.4` (label: homebrew.mxcl.mongodb-community@4.4)
ellord@ellords-Mac-mini 57dbBackup % brew services start mongodb-community@4.4
==> Successfully started `mongodb-community@4.4` (label: homebrew.mxcl.mongodb-community@4.4)

 

'MongoDB' 카테고리의 다른 글

macos 에서 mongodb 재시작  (0) 2025.10.31
블로그 이미지

엘로드넷

,

 

1. 실행목록 확인

ellord@ellords-Mac-mini 57dbBackup % brew services list
Name                  Status   User   File
dovecot               none     root   
httpd                 error  1 root   ~/Library/LaunchAgents/homebrew.mxcl.httpd.plist
mariadb               started  ellord ~/Library/LaunchAgents/homebrew.mxcl.mariadb.plist
mongodb-community@4.4 started  ellord ~/Library/LaunchAgents/homebrew.mxcl.mongodb-community@4.4.plist
php                   none

 

2. 중지

 

ellord@ellords-Mac-mini 57dbBackup % brew services stop mongodb-community@4.4
Stopping `mongodb-community@4.4`... (might take a while)
==> Successfully stopped `mongodb-community@4.4` (label: homebrew.mxcl.mongodb-community@4.4)

 

 

3. 시작

 

ellord@ellords-Mac-mini 57dbBackup % brew services start mongodb-community@4.4
==> Successfully started `mongodb-community@4.4` (label: homebrew.mxcl.mongodb-community@4.4)

 

 

4. 접속확인

ellord@ellords-Mac-mini 57dbBackup % mongo
MongoDB shell version v4.4.29
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
Implicit session: session { "id" : UUID("80138246-6473-4786-b772-c9d2aaf94492") }
MongoDB server version: 4.4.29
---
The server generated these startup warnings when booting: 
        2025-10-31T10:02:55.807+09:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted
---
> db
test
>

 

'MongoDB' 카테고리의 다른 글

macos 에서 mongodb 원격접속  (0) 2025.10.31
블로그 이미지

엘로드넷

,

1. brew install mariadb

 

ellord@Chanui-MacBookPro ~ % brew install mariadb
==> Downloading https://formulae.brew.sh/api/formula.jws.json
==> Downloading https://formulae.brew.sh/api/cask.jws.json
==> Fetching downloads for: mariadb
==> Downloading https://ghcr.io/v2/homebrew/core/mariadb/manifests/11.8.2
########################################################################################## 100.0%
==> Fetching dependencies for mariadb: mecab, mecab-ipadic, msgpack, ca-certificates, openssl@3 and groonga
==> Downloading https://ghcr.io/v2/homebrew/core/mecab/manifests/0.996-4
########################################################################################## 100.0%
==> Fetching mecab
==> Downloading https://ghcr.io/v2/homebrew/core/mecab/blobs/sha256:d91a5e1bd7fdea15cfc0469705b33
########################################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/mecab-ipadic/manifests/2.7.0-20070801-1
########################################################################################## 100.0%
==> Fetching mecab-ipadic
==> Downloading https://ghcr.io/v2/homebrew/core/mecab-ipadic/blobs/sha256:12212f7bc769338a7747d2
########################################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/msgpack/manifests/6.1.0
########################################################################################## 100.0%
==> Fetching msgpack
==> Downloading https://ghcr.io/v2/homebrew/core/msgpack/blobs/sha256:f8a10c653f0e071f725866c790e
########################################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/manifests/2025-07-15
########################################################################################## 100.0%
==> Fetching ca-certificates
==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/blobs/sha256:84e089e758e75d61228
########################################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/manifests/3.5.1
########################################################################################## 100.0%
==> Fetching openssl@3
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/blobs/sha256:752c0242eaad67ab63c47448f
########################################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/groonga/manifests/15.1.3
########################################################################################## 100.0%
==> Fetching groonga
==> Downloading https://ghcr.io/v2/homebrew/core/groonga/blobs/sha256:346e2596561348e7aa5bf2d7f3a
########################################################################################## 100.0%
==> Fetching mariadb
==> Downloading https://ghcr.io/v2/homebrew/core/mariadb/blobs/sha256:fede2f4bad07d091fc504197718
########################################################################################## 100.0%
==> Installing dependencies for mariadb: mecab, mecab-ipadic, msgpack, ca-certificates, openssl@3 and groonga
==> Installing mariadb dependency: mecab
==> Downloading https://ghcr.io/v2/homebrew/core/mecab/manifests/0.996-4
Already downloaded: /Users/ellord/Library/Caches/Homebrew/downloads/c3b1ce288999bf20be4e6f931edd01876367bd1046d2d7979b68eb3e5f2315f9--mecab-0.996-4.bottle_manifest.json
==> Pouring mecab--0.996.sonoma.bottle.4.tar.gz
🍺  /usr/local/Cellar/mecab/0.996: 19 files, 3.9MB
==> Installing mariadb dependency: mecab-ipadic
==> Downloading https://ghcr.io/v2/homebrew/core/mecab-ipadic/manifests/2.7.0-20070801-1
Already downloaded: /Users/ellord/Library/Caches/Homebrew/downloads/daa8ae338ff2bd6c9d5e70d7b50f6571f1dd831848ea35ad632cd3ceb14917f6--mecab-ipadic-2.7.0-20070801-1.bottle_manifest.json
==> Pouring mecab-ipadic--2.7.0-20070801.sonoma.bottle.1.tar.gz
🍺  /usr/local/Cellar/mecab-ipadic/2.7.0-20070801: 15 files, 50.6MB
==> Installing mariadb dependency: msgpack
==> Downloading https://ghcr.io/v2/homebrew/core/msgpack/manifests/6.1.0
Already downloaded: /Users/ellord/Library/Caches/Homebrew/downloads/64deb06ebbeaaf491c089ce032ab47d3a2fd7017a0d42f92620a8feed75d9e28--msgpack-6.1.0.bottle_manifest.json
==> Pouring msgpack--6.1.0.sonoma.bottle.tar.gz
🍺  /usr/local/Cellar/msgpack/6.1.0: 39 files, 183.8KB
==> Installing mariadb dependency: ca-certificates
==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/manifests/2025-07-15
Already downloaded: /Users/ellord/Library/Caches/Homebrew/downloads/1b8ec93adfe410583ff46788783b030707eec1898c7ded356e25694e4c29aa32--ca-certificates-2025-07-15.bottle_manifest.json
==> Pouring ca-certificates--2025-07-15.all.bottle.tar.gz
==> Regenerating CA certificate bundle from keychain, this may take a while...
🍺  /usr/local/Cellar/ca-certificates/2025-07-15: 4 files, 225.8KB
==> Installing mariadb dependency: openssl@3
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/manifests/3.5.1
Already downloaded: /Users/ellord/Library/Caches/Homebrew/downloads/9d8c8da104539ae29f198f366fe5794ac377d96a92458ae62557e3f83b03a351--openssl@3-3.5.1.bottle_manifest.json
==> Pouring openssl@3--3.5.1.sequoia.bottle.tar.gz
🍺  /usr/local/Cellar/openssl@3/3.5.1: 7,563 files, 35.9MB
==> Installing mariadb dependency: groonga
==> Downloading https://ghcr.io/v2/homebrew/core/groonga/manifests/15.1.3
Already downloaded: /Users/ellord/Library/Caches/Homebrew/downloads/e320072797b1d2ea631c2a7f2d0675e061ec80105edc6cb031072ac9a236c709--groonga-15.1.3.bottle_manifest.json
==> Pouring groonga--15.1.3.sonoma.bottle.tar.gz
🍺  /usr/local/Cellar/groonga/15.1.3: 907 files, 94.4MB
==> Installing mariadb
==> Pouring mariadb--11.8.2.sonoma.bottle.tar.gz
==> /usr/local/Cellar/mariadb/11.8.2/bin/mysql_install_db --verbose --user=ellord --basedir=/usr/
==> Caveats
A "/etc/my.cnf" from another install may interfere with a Homebrew-built
server starting up correctly.

MySQL is configured to only allow connections from localhost by default

To start mariadb now and restart at login:
  brew services start mariadb
Or, if you don't want/need a background service you can just run:
  /usr/local/opt/mariadb/bin/mariadbd-safe --datadir\=/usr/local/var/mysql
==> Summary
🍺  /usr/local/Cellar/mariadb/11.8.2: 966 files, 235.2MB
==> Running `brew cleanup mariadb`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Caveats
==> mariadb
A "/etc/my.cnf" from another install may interfere with a Homebrew-built
server starting up correctly.

MySQL is configured to only allow connections from localhost by default

To start mariadb now and restart at login:
  brew services start mariadb
Or, if you don't want/need a background service you can just run:
  /usr/local/opt/mariadb/bin/mariadbd-safe --datadir\=/usr/local/var/mysql

 

 

 

2. mariadb 시작

 

ellord@Chanui-MacBookPro ~ % brew services start mariadb
==> Successfully started `mariadb` (label: homebrew.mxcl.mariadb)

 

 

 

 

 

3. maraidb 접속

 

ellord@Chanui-MacBookPro ~ % mariadb
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 5
Server version: 11.8.2-MariaDB Homebrew

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
| test               |
+--------------------+
5 rows in set (0.001 sec)

 

 

4. mysql DB선택

 

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
| test               |
+--------------------+
5 rows in set (0.001 sec)

MariaDB [(none)]> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

 

5. root 비번 설정

 

MariaDB [mysql]> select host,user,password from user;
+-------------------------+-------------+----------+
| Host                    | User        | Password |
+-------------------------+-------------+----------+
| localhost               | mariadb.sys |          |
| localhost               | root        | invalid  |
| localhost               | ellord      | invalid  |
|                         | PUBLIC      |          |
| localhost               |             |          |
| chanui-macbookpro.local |             |          |
+-------------------------+-------------+----------+
6 rows in set (0.001 sec)

MariaDB [mysql]> set password for 'root'@'localhost'=password('didcksals00A%*%A');
Query OK, 0 rows affected (0.009 sec)

 

 

6. 설정 값 적용

MariaDB [mysql]> flush privileges;
Query OK, 0 rows affected (0.001 sec)

MariaDB [mysql]> select host,user,password from user;
+-------------------------+-------------+-------------------------------------------+
| Host                    | User        | Password                                  |
+-------------------------+-------------+-------------------------------------------+
| localhost               | mariadb.sys |                                           |
| localhost               | root        | *AFB14E2338F689442E9555CDCB6E0EEFD1896B04 |
| localhost               | ellord      | invalid                                   |
|                         | PUBLIC      |                                           |
| localhost               |             |                                           |
| chanui-macbookpro.local |             |                                           |
+-------------------------+-------------+-------------------------------------------+
6 rows in set (0.002 sec)

 

 

7. 새로운 비밀번호로 접속

 

ellord@Chanui-MacBookPro ~ % mysql -u root -p mysql
Enter password: 
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 6
Server version: 11.8.2-MariaDB Homebrew

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [mysql]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
| test               |
+--------------------+
5 rows in set (0.001 sec)
블로그 이미지

엘로드넷

,