介绍:前面介绍过如何获取MongoDB Atlas云数据库的一个mongodb的实例,详情看

但是我用下来不太好用,安全机制完全搞不来,随后我找到另外一家云数据库托管的商家,非常良心,注册可免费用MySQLMongoDBPostgreSQL三个开发者实例

我们拿到实例可以干什么呢?

我主要是用MongoDB来搭建leanote,详情看 Leanote蚂蚁笔记-可私人搭建的笔记

MySQL用来搭建lychee相册,详情看

截图

注册账号

验证邮箱

登录获取实例

1、登录进入管理页面,完善你的信息

2、点击Personal space

3、点击 an add-on

4、创建实例

提供了MySQL、MongoDB、PostgreSQL三个开发者免费的共享实例,下面我罗列一下

MySQL规格
MongoDB规格
PostgreSQL规格

选择你想要的实例

5、然后选择免费的实例,滑动到底,点击next

6、设置实例名称,地区有法国,点击next

7、可以得到你的实例信息了

8、尝试连接

如下则连接成功

如果报错

根据你的系统安装mongodb

root@ecs-949d:~# apt install mongodb
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libboost-chrono1.62.0 libboost-filesystem1.62.0 libboost-program-options1.62.0 libboost-regex1.62.0 libboost-system1.62.0 libboost-thread1.62.0
  libgoogle-perftools4 libpcrecpp0v5 libsnappy1v5 libstemmer0d libtcmalloc-minimal4 libunwind8 libyaml-cpp0.5v5 mongo-tools mongodb-clients
  mongodb-server
The following NEW packages will be installed:
  libboost-chrono1.62.0 libboost-filesystem1.62.0 libboost-program-options1.62.0 libboost-regex1.62.0 libboost-system1.62.0 libboost-thread1.62.0
  libgoogle-perftools4 libpcrecpp0v5 libsnappy1v5 libstemmer0d libtcmalloc-minimal4 libunwind8 libyaml-cpp0.5v5 mongo-tools mongodb mongodb-clients
  mongodb-server
0 upgraded, 17 newly installed, 0 to remove and 34 not upgraded.
Need to get 45.9 MB of archives.
After this operation, 198 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://deb.debian.org/debian stretch/main amd64 libpcrecpp0v5 amd64 2:8.39-3 [151 kB]
Get:2 http://deb.debian.org/debian stretch/main amd64 libboost-system1.62.0 amd64 1.62.0+dfsg-4 [32.4 kB]
Get:3 http://deb.debian.org/debian stretch/main amd64 libboost-chrono1.62.0 amd64 1.62.0+dfsg-4 [36.0 kB]
Get:4 http://deb.debian.org/debian stretch/main amd64 libboost-filesystem1.62.0 amd64 1.62.0+dfsg-4 [63.2 kB]
Get:5 http://deb.debian.org/debian stretch/main amd64 libboost-program-options1.62.0 amd64 1.62.0+dfsg-4 [159 kB]
Get:6 http://deb.debian.org/debian stretch/main amd64 libboost-regex1.62.0 amd64 1.62.0+dfsg-4 [288 kB]
Get:7 http://deb.debian.org/debian stretch/main amd64 libboost-thread1.62.0 amd64 1.62.0+dfsg-4 [71.5 kB]
Get:8 http://deb.debian.org/debian stretch/main amd64 libtcmalloc-minimal4 amd64 2.5-2.2 [121 kB]
Get:9 http://deb.debian.org/debian stretch/main amd64 libunwind8 amd64 1.1-4.1 [48.7 kB]
Get:10 http://deb.debian.org/debian stretch/main amd64 libgoogle-perftools4 amd64 2.5-2.2 [224 kB]
Get:11 http://deb.debian.org/debian stretch/main amd64 libstemmer0d amd64 0+svn585-1+b2 [63.3 kB]
Get:12 http://deb.debian.org/debian stretch/main amd64 libyaml-cpp0.5v5 amd64 0.5.2-4 [151 kB]
Get:13 http://deb.debian.org/debian stretch/main amd64 mongo-tools amd64 3.2.11-1+b3 [12.2 MB]
Get:14 http://deb.debian.org/debian stretch/main amd64 libsnappy1v5 amd64 1.1.3-3 [51.0 kB]
Get:15 http://deb.debian.org/debian stretch/main amd64 mongodb-clients amd64 1:3.2.11-2+deb9u1 [20.4 MB]
Get:16 http://deb.debian.org/debian stretch/main amd64 mongodb-server amd64 1:3.2.11-2+deb9u1 [11.8 MB]
Get:17 http://deb.debian.org/debian stretch/main amd64 mongodb amd64 1:3.2.11-2+deb9u1 [16.9 kB]
Fetched 45.9 MB in 0s (86.0 MB/s)
Selecting previously unselected package libpcrecpp0v5:amd64.
(Reading database ... 40338 files and directories currently installed.)
Preparing to unpack .../00-libpcrecpp0v5_2%3a8.39-3_amd64.deb ...

Progress: [  0%] [...................................................................................................................................] 
Unpacking libpcrecpp0v5:amd64 (2:8.39-3) ............................................................................................................] 
Progress: [ 97%] [###############################################################################################################################....] 
Processing triggers for libc-bin (2.24-11+deb9u4) ...##############################################################################################..] 
Processing triggers for systemd (232-25+deb9u12) ...
root@ecs-949d:~# mongo -version
MongoDB shell version: 3.2.11
root@ecs-949d:~# 

出现 MongoDB shell version: 3.2.11便可重新连接数据库

其他的MySQLPostgreSQL步骤像上面一样便可


【腾讯云】星星海SA2云服务器618钜惠,1核2G 首年95元【点击查看】。


文章: 《免费获取 Clever Cloud云数据库实例-MySQL、MongoDB、PostgreSQL》
联系方式:
文章链接:https://www.wxiou.cn/index.php/archives/106/
除特别注明外,文章均为Literature原创,转载时请注明本文出处及文章链接
Last modification:July 24th, 2020 at 06:57 pm
如果觉得我的文章对你有用,请随意赞赏