先放出无门槛注册地址:planetscale.com
下面是一个简要的注册步骤。
步骤 1 注册并验证 email 地址
步骤 2 进入控制台
Deploy a fully managed database with the reliability of MySQL and the scale of open source Vitess in just ten seconds. Built-in connection pooling means you’ll never run into connection limits for your database.
号称可以数秒中开通一个 mysql 兼容的,客户全面管理的,没有连接数限制的云数据库
声称支持灵活的 schema 。
步骤 3 开始创建数据库
遇到这个页面后,可以自建数据,也可以导入一个现成的数据库。
步骤 4 选择所在的区域
根据页面提示,可以选择我们喜欢的 aws 东京区域
选择后确定,可以耐心等待数据库创建成功
步骤 5 连接访问数据库
根据文档,planetscale 提供了各种方式去连接 mysql
我们测试以下 mysql 命令行的方式去连接。
需要注意的:首先需要去密码管理生成一个用户名+密码,密码需要记录下来,不要忘记保存,其次,mysql 连接需要提供 ssl-ca 证书。找到 ca 证书后,你可以使用这样的链接命令行工具去连数据库。
mysql -h ap-northeast.connect.psdb.cloud -u xxxx -p'pscale_xxxx' --ssl-ca=/etc/pki/tls/certs/ca-bundle.crt dbtokyo
CA 证书的路径,放在文章最后供你参考。
简单总结,Planetscale 是一个非常值得推荐使用的云 mysql 数据库。免费套餐提供了 5G 的数据库存储,足够的读写次数;提供了 aws 东京区域的 node ,非常值得中国大陆用户选择,如果你使用的是 aws 的 vps 更是值得考虑;提供了 mysql 数据库的监控、备份(一天一次)等服务,如果你的服务非常关键,需要考虑数据库的安全性,对于免费用户也有良好的备份服务,那是非常有诚意。
更新使用经验和更新参考: https://zhuji188.com/805.html
附上免费套餐的参数: 1000w 写 /月 10 亿 /读 5G 存储。
收费的套餐
On Linux, the path to the system CA roots depends on the distribution that you are using.
Debian / Ubuntu / Gentoo / Arch / Slackware
This path also applies to Debian or Ubuntu derivatives. You need to make sure the ca-certificates package is installed.
Copied
/etc/ssl/certs/ca-certificates.crt
RedHat / Fedora / CentOS / Mageia / Vercel / Netlify
This path also applies to RedHat or Fedora derivatives like Amazon Linux and Oracle Linux. This is the path to use for applications deployed on Vercel and Netlify.
Copied
/etc/pki/tls/certs/ca-bundle.crt
Alpine
This is a commonly used distribution for Docker containers.
Copied
/etc/ssl/cert.pem
OpenSUSE
This also applies to OpenSUSE derivatives.
Copied
/etc/ssl/ca-bundle.pem
MacOS / FreeBSD / OpenBSD
MacOS provides an extracted version of the system roots on disk that can be used for the CA roots. On FreeBSD you need to install the ca_root_nss package for this path to be available.
Copied
/etc/ssl/cert.pem
Windows
Windows does not provide a file with the CA roots that can be used by your driver. Many languages often used on Windows like C#, Java or Go do not need the CA root path and will use the Windows internal system roots by default. In those environments, you don't need to specify a root CA list.
If you are using a language that requires specifying the CA root path, like C or PHP, the curl project provides an extracted bundle of root certificates from the Mozilla CA Certificate program. You can download the bundle at https://curl.se/docs/caextract.html. Once you download the file, you can point at it with the correct configuration options for the driver that you are using.
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.