[英]Connecting to a MySQL DB with SnowFlake in a Jupyter Notebook
New to all of this.这一切都是新的。
I have a MySQL database, set up with a connection to Snowflake which allows me to query all of the data I have inside the MySql workbench.我有一个 MySQL 数据库,设置了与 Snowflake 的连接,这使我可以查询 MySql 工作台中的所有数据。 The connections looks like this
连接看起来像这样
I am now trying to query the data inside a jupyter notebook (hosted locally), and tried using this code to connect, which is telling me theres an issue, and from the error message I am assuming this is due to the hostname.我现在正在尝试查询 jupyter notebook(本地托管)中的数据,并尝试使用此代码进行连接,这告诉我存在问题,并且根据错误消息我假设这是由于主机名引起的。 Can anyone clarify this?
谁能澄清一下?
conn=pymysql.connect(host='jdbc:snowflake://xy12345.location.snowflakecomputing.com/',
port=int(3306),
user='myname',
passwd='thepasswordiuse',
db='TRAINING_DB')
The account name itself is missing in front of the location, see here: https://docs.snowflake.com/en/user-guide/admin-account-identifier.html位置前面缺少帐户名本身,请参见此处: https://docs.snowflake.com/en/user-guide/admin-account-identifier.html
One example is xy12345.us-east-1.snowflakecomputing.com/
and the xy12345-part is missing in your example.一个示例是
xy12345.us-east-1.snowflakecomputing.com/
,您的示例中缺少 xy12345-part。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.