使用Boto3与RDS上的Amazon Aurora进行交互 [英] Using Boto3 to interact with amazon Aurora on RDS

查看:141
本文介绍了使用Boto3与RDS上的Amazon Aurora进行交互的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用Amazon Aurora在Amazon RDS中建立了一个数据库,并希望使用Python与该数据库进行交互-显而易见的选择是使用Boto.

I have set up a database in Amazon RDS using Amazon Aurora and would like to interact with the database using Python - the obvious choice is to use Boto.

但是,他们的文档很糟糕,并且没有涵盖我与数据库交互的方式:

However, their documentation is awful and does nopt cover ways in which I can interact with the databse to:

  • 使用SQL语句运行查询
  • 与数据库中的表进行交互

是否有人链接到一些示例/教程,或者知道如何执行这些任务?

Does anyone have an links to some examples/tutorials, or know how to do these tasks?

推荐答案

在使用Amazon RDS产品(包括Aurora)时,您不会通过任何AWS API(包括Boto)连接到数据库.相反,您将使用所选数据库的本机客户端.对于Aurora,您将使用MySQL命令行客户端进行连接.从那里,您可以像查询其他任何MySQL数据库一样对其进行查询.

When using Amazon RDS offerings (including Aurora), you don't connect to the database via any AWS API (including Boto). Instead you would use the native client of your chosen database. In the case of Aurora, you would connect using the MySQL Command Line client. From there, you can query it just like any other MySQL database.

入门"文档中有一个简短的部分,讨论了如何连接到Aurora数据库:

There's a brief section of the "Getting Started" documentation that talks about connecting to your Aurora database:

连接到Amazon Aurora数据库集群

这篇关于使用Boto3与RDS上的Amazon Aurora进行交互的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆