V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
ggvm
V2EX  ›  分享发现

免费申请 5G 空 mysql 云数据库(每日备份),申请简易有 aws 东京区域

  •  
  •   ggvm · 2022-10-09 09:57:46 +08:00 · 5935 次点击
    这是一个创建于 537 天前的主题,其中的信息可能已经有所发展或是发生改变。

    先放出无门槛注册地址: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.
    46 条回复    2024-03-21 11:31:03 +08:00
    08110920
        1
    08110920  
       2022-10-09 10:00:45 +08:00
    We have detected your current region is China. PlanetScale is not available in this location.
    If you think this has been a mistake, please contact [email protected].
    yaott2020
        2
    yaott2020  
       2022-10-09 10:03:55 +08:00 via Android
    @08110920 被薅怕了吧
    ggvm
        3
    ggvm  
    OP
       2022-10-09 10:06:27 +08:00
    @08110920 忘记说了,我使用的是美国的上网 ip
    08110920
        4
    08110920  
       2022-10-09 10:10:40 +08:00
    https://memfiredb.com/ 国内免费的 不过不知道能持续多久
    knva
        5
    knva  
       2022-10-09 10:17:16 +08:00
    注册成功了
    yeepZhang
        6
    yeepZhang  
       2022-10-09 10:49:33 +08:00
    成功了,感谢
    0312birdzhang
        7
    0312birdzhang  
       2022-10-09 11:20:16 +08:00
    成功了,谢谢
    nash
        8
    nash  
       2022-10-09 11:28:38 +08:00
    We have detected your current region is China. PlanetScale is not available in this location.
    wfd0807
        9
    wfd0807  
       2022-10-09 12:03:44 +08:00
    成功了,谢谢
    sickoo
        10
    sickoo  
       2022-10-09 12:12:17 +08:00
    成功了,谢谢
    registerrr
        11
    registerrr  
       2022-10-09 14:04:32 +08:00
    成功了
    ggvm
        12
    ggvm  
    OP
       2022-10-09 14:07:50 +08:00
    @registerrr 成功几乎是必然的。
    siriussilen
        13
    siriussilen  
       2022-10-09 14:09:42 +08:00
    成功了,谢谢
    byasm32
        14
    byasm32  
       2022-10-09 14:23:49 +08:00
    好用,感谢!
    VTEX9527
        15
    VTEX9527  
       2022-10-09 15:21:31 +08:00
    感谢分享,注册一个玩玩
    inktiger
        16
    inktiger  
       2022-10-09 15:29:48 +08:00
    我仿佛看到几个月后停止服务的通告,任何羊敢到我大中华来都没好下场[狗头]
    ersic
        17
    ersic  
       2022-10-09 15:30:28 +08:00
    @08110920 只有 postgresql
    wonderfulcxm
        18
    wonderfulcxm  
       2022-10-09 15:34:46 +08:00 via iPhone
    希望能坚持久一点。
    neptuno
        19
    neptuno  
       2022-10-09 15:55:46 +08:00
    这个我用了一段时间,感觉事务有点问题,同一事务里面先 insert 再 select 查不出来,切换到其他数据库就正常了。
    CSGO
        20
    CSGO  
       2022-10-09 16:13:41 +08:00
    非程序员疑问:这个数据库 mysql ,就是比如装的 wordpress 的 mysql 吗?那么原本安装它在服务器上其实就是服务器的数据库,那注册这个后,要这么在安装 wordpress 时用上它当数据库呢?
    cssk
        21
    cssk  
       2022-10-09 16:25:59 +08:00 via iPhone
    @CSGO #20 wp-config.php 里把 mysql 的地址从 local 改成远程地址
    CSGO
        22
    CSGO  
       2022-10-09 16:56:24 +08:00
    @cssk 是,我知道有一种远程的例如 ip+root+密码,但是 op 发的这个,似乎是 linux 服务器连接啥的,好像不相干。
    r00t7
        23
    r00t7  
       2022-10-09 18:00:18 +08:00
    还禁止毛子 IP 注册 绝了
    yagamil
        24
    yagamil  
       2022-10-09 18:12:43 +08:00
    就看活多久
    ijrou
        25
    ijrou  
       2022-10-09 18:15:50 +08:00
    已成功过领取~~很棒~
    ggvm
        26
    ggvm  
    OP
       2022-10-09 18:22:01 +08:00
    @neptuno 你的事务隔离选项应该没选对。
    ggvm
        27
    ggvm  
    OP
       2022-10-09 18:22:54 +08:00
    @CSGO 你真的要去好好学习了。。。
    Kaiyuan
        28
    Kaiyuan  
       2022-10-09 18:39:25 +08:00
    原来我以前就注册过了,但是没有建立数据库。中国 IP 好像也不能注册。
    yagamil
        29
    yagamil  
       2022-10-09 19:25:32 +08:00
    Foreign key constraints are not allowed #18
    https://github.com/planetscale/discussion/discussions/18

    数据库不支持外键。
    wan68
        30
    wan68  
       2022-10-09 19:52:11 +08:00
    没看到京东区域,只有 US 和 EU ,AU 这几个区域
    yagamil
        31
    yagamil  
       2022-10-09 20:05:34 +08:00
    > Foreign key constraints are not allowed #18


    数据库不支持外键。

    也就是 wordpress 用不了。
    HopeLee
        32
    HopeLee  
       2022-10-09 21:29:38 +08:00
    成功了 帅气
    infinityv
        33
    infinityv  
       2022-10-09 21:37:18 +08:00
    Tokyo 已经无了 推荐哪个区呢
    ggvm
        34
    ggvm  
    OP
       2022-10-09 23:32:53 +08:00
    @infinityv 美国西海岸
    Maxwe11
        35
    Maxwe11  
       2022-10-10 00:13:13 +08:00
    注册成功了,大陆 ip 不能提供服务,需要额外处理一下;

    确实 jp 的服务节点没了,挑了个 mumbai ,如果是三哥的那个 mumbai ,相对来说也近点儿,至少比 us 、eu 之类的快些,理论上的,感谢分享。
    neptuno
        36
    neptuno  
       2022-10-10 08:31:53 +08:00 via iPhone
    @neptuno #19 应该是的,我去看看在哪改
    CSGO
        37
    CSGO  
       2022-10-10 08:54:58 +08:00
    @ggvm XD 。我不是这行的,就是喜欢这种东西注册玩玩。但是这个要搜索啥可以学到呢,就单这个知识点。
    Blanke
        38
    Blanke  
       2022-10-10 08:58:33 +08:00
    有东京区域了
    lazyyz
        39
    lazyyz  
       2022-10-10 10:04:23 +08:00
    嗯……注册好了东京区域,但是不知道用来干什么……
    litterGuy
        40
    litterGuy  
       2022-10-10 11:03:31 +08:00
    注册成功了
    WenJimmy
        41
    WenJimmy  
       2022-10-10 16:39:04 +08:00
    东京区域注册成功
    newte88
        42
    newte88  
       2022-10-11 00:19:47 +08:00 via Android
    navicat 选择 ssl 连接,报连接失败,jdbc 可以连接使用,navicat 需要做什么配置吗
    aptupdate
        43
    aptupdate  
       2022-10-11 16:47:50 +08:00
    @newte88 选择 ssl 连接后还需要添加 ca 证书,不同系统的证书路径可以参考最后一段。
    我今天注册发现还有东京,试了下 50ms 的速度还挺好,希望能活的久一点。
    shmilypeter
        44
    shmilypeter  
       2022-10-12 19:08:32 +08:00
    新加坡区域注册成功,感谢。

    不爬梯可以用 mysql cli 直接访问数据库,但是网站的实例页面就无法访问了,爬梯一切正常。


    @newte88 navicat 里你需要配一下 ssl 证书的地址,你可能是地址配错了,我可以使用 navicat 和 datagrip 连接成功
    MENGKE
        45
    MENGKE  
       2023-02-22 09:57:35 +08:00
    已领取
    frank42a
        46
    frank42a  
       8 天前
    Note that the free Hobby plan is no longer available 已经木有免费了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5312 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 49ms · UTC 08:28 · PVG 16:28 · LAX 01:28 · JFK 04:28
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.