db2 IBM-db与Google Colab的连接

km0tfn4u  于 2022-11-07  发布在  DB2
关注(0)|答案(2)|浏览(172)

这里是问题,我得到了以下错误消息从系统,任何人都可以帮助我解决它吗?这是我的输入代码


# Enter your Db2 credentials in the connection string below

# Recall you created Service Credentials in Part III of the first lab of the course in Week 1

# i.e. from the uri field in the Service Credentials copy everything after db2:// (but remove the double quote at the end)

# for example, if your credentials are as in the screenshot above, you would write:

# %sql ibm_db_sa://my-username:my-password@hostname:port/BLUDB?security=SSL

# Note the ibm_db_sa:// prefix instead of db2://

# This is because JupyterLab's ipython-sql extension uses sqlalchemy (a python SQL toolkit)

# which in turn uses IBM's sqlalchemy dialect: ibm_db_sa

%sql ibm_db_sa://xxxxxx77:xxxxxxxxxxxxxxxZR@ba99a9e6-d59e-4883-8fc0-d6a8c9f7a08f.c1ogj3sd0tgtu0lqde00.databases.appdomain.cloud:31321/bludb?security=SSL

用户名和密码是正确的,因为我使用IBM-db API连接方法,它很好,成功连接到IBM云数据库

Connection info needed in SQLAlchemy format, example:
               postgresql://username:password@hostname/dbname
               or an existing connection: dict_keys([])
Can't load plugin: sqlalchemy.dialects:ibm_db_sa
Connection info needed in SQLAlchemy format, example:
               postgresql://username:password@hostname/dbname
               or an existing connection: dict_keys([])
zxlwwiss

zxlwwiss1#

这里有两个图像,我尝试在谷歌colab,安装ibm_db和其他要求,

这里是图像显示,它没有通过它

xxhby3vn

xxhby3vn2#

安全性=SSL;两个分号一起工作。我在co-lab也遇到了同样的问题

相关问题