PS C:\Program Files\MongoDB\Server\4.0\bin> ./mongo MongoDB shell version v4.0.1 connecting to: mongodb://127.0.0.1:27017 MongoDB server version: 4.0.1 Welcome to the MongoDB shell. For interactive help, type"help". For more comprehensive documentation, see http://docs.mongodb.org/ Questions? Try the support group http://groups.google.com/group/mongodb-user Server has startup warnings: 2018-08-16T14:36:30.219+0800 I CONTROL [initandlisten] 2018-08-16T14:36:30.219+0800 I CONTROL [initandlisten] ** WARNING: Access control isnot enabled for the database. 2018-08-16T14:36:30.220+0800 I CONTROL [initandlisten] ** Read and write accessto data andconfigurationis unrestricted. 2018-08-16T14:36:30.220+0800 I CONTROL [initandlisten] --- Enable MongoDB's free cloud-based monitoring service, which will then receive and display metrics about your deployment (disk utilization, CPU, operation statistics, etc).
The monitoring data will be available on a MongoDB website with a unique URL accessible to you and anyone you share the URL with. MongoDB may use this information to make product improvements andto suggest MongoDB products and deployment options to you.
To enable free monitoring, run the following command: db.enableFreeMonitoring() To permanently disable this reminder, run the following command: db.disableFreeMonitoring()
MongoDB扩展安装
这里做下补充, 在windows环境下开发需要安装mongodb的扩展
首先, php -m 查看是否已有mongodb的扩展
其次, php -v 查看环境的版本
1 2 3 4 5
$ php -v PHP 7.2.1 (cli) (built: Jan 4201804:28:54) ( NTS MSVC15 (Visual C++ 2017) x86 ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies