gpt4 book ai didi

mysql - 如何使用mysql作为jupyterhub的数据库?

转载 作者:行者123 更新时间:2023-11-29 05:54:27 25 4
gpt4 key购买 nike

JupyterHub 的默认数据库是 SQLite 数据库。但是我想用 MySQL 替换 SQLite 数据库。我尝试使用配置文件中的配置变量。

c.JupyterHub.db_url = 'jdbc:mysql://localhost:3306/test'

但是当我运行 jupyterhub 时,它会产生如下错误:

sqlalchemy.exc.ArgumentError: Could not parse rfc1738 URL from string 'jdbc:mysql://localhost:3306/test'

我搜索并研究了 jupyterhub 的官方文档,但没有找到与我的问题相关的任何内容。这个问题有什么解决办法吗??有人吗???

谢谢!

最佳答案

找到解决上述问题的确切行。

c.JupyterHub.db_url = 'mysql+mysqlconnector://{}:{}@{}/{}{}'.format("username","password","host","database","")

关于mysql - 如何使用mysql作为jupyterhub的数据库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51037956/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com