首页 \ 问答 \ 从EC2实例访问RDS(Access RDS from EC2 instance)

从EC2实例访问RDS(Access RDS from EC2 instance)

我很难弄清楚如何给一个ec2实例访问RDS实例以执行mysqldump。

我是否需要添加允许ec2实例访问该服务器的安全组? 我尝试使用RDS端点,但它不允许。


I am having a hard time figuring out how to give an ec2 instance access to an RDS instance in order to perform a mysqldump.

Do I need to add a security group that allows the ec2 instance access to that server? I tried this using the RDS endpoint and it would not allow.


原文:https://stackoverflow.com/questions/33026931
更新时间:2022-07-24 13:07

最满意答案

查找大文件(具有名称)的技巧通常是du -a ,通常用于sort -n 。 这最后会为您提供最大的文件(因此小文件从页面顶部消失并不重要)。

你可能还有一个进程仍然在运行时打开一个无名文件,当它有机会时它正在写入,这就是占用空间。 这可能是它打开以存储数据的临时文件,也可能是某人删除的日志文件。 它使用的空间不会显示为可用空间,但它也不会显示为与du -a (或任何其他选项)一起使用,因为没有文件名。 如果您不知道它是哪个进程,则可以使用重新启动来停止进程(所有进程),从而释放空间。


The trick for finding the big files (that have names) is usually du -a, often piped into sort -n. This gives you the biggest files last (so it doesn't matter that the small files disappear off the top of the page).

You may have a process still running with a nameless file open that it is writing to when it gets the chance, that is eating up the space. This could be a temporary file that it opened to store data, or it could be a log file that someone removed. The space it uses won't show as free space, but neither will it show up as in use with du -a (or any other options) because there isn't a file name. If you don't know which process it is, you could use a reboot to stop the process (all processes), thereby releasing the space.

相关问答

更多
  • 所以在理论上, prealloc文件是预先分配的日志文件。 这与使用格式为j._X日志文件j._X ,其中X是数字。 这里的目标是在最后一个文件用完空间时,已经分配了“下一个”文件。 预配置通常比按需分配快得多。 删除这些或移动它是否可以安全? 你所寻求的答案是在这里的文件。 那里的文档似乎提供了你的问题的关键答案: 预分配文件不包含数据,而是简单地预先分配的文件,这些文件是准备使用的,这些文件是由文件系统真正预先分配的(即它们不是“稀疏”)。 因此,删除它们是安全的,但是如果您使用日志记录重新启动mong ...
  • 尝试此脚本 - 它将列出数据行中所有表的行数和空间(以及使用的总空间): SELECT t.NAME AS TableName, i.name AS indexName, SUM(p.rows) AS RowCounts, SUM(a.total_pages) AS TotalPages, SUM(a.used_pages) AS UsedPages, SUM(a.data_pages) AS DataPages, (SUM(a.total_pages) * 8) / 1024 AS T ...
  • 根据http://wiki.bash-hackers.org/syntax/ccmd/conditional_expression,=〜是: =~ 将根据扩展正则表达式进行检查 - 匹配时为TRUE 所以^#是一个扩展的正则表达式。 因为#不是扩展正则表达式中的特殊字符。 if的含义检查$1中的字符串不以#开头。 所以在命令行上 $ if [[ ! '#' =~ ^# ]]; then echo matches; else echo no match; ...
  • 怎么样: paste keyfile <(cut -d' ' -f2 file1) <(cut -d' ' -f2 file2) ... <(cut -d' ' -f2 fileN) how about: paste keyfile <(cut -d' ' -f2 file1) <(cut -d' ' -f2 file2) ... <(cut -d' ' -f2 fileN)
  • 我终于找到了这个错误 - 正如我所料,它是非常愚蠢的: 我正在将这些变化合并到错误的背景中。 I finally found the bug - and as I expected, it was quite stupid one: I was merging the changes into the wrong context.
  • 没关系,因为12k产品至少有12k的图像。 如果您的产品图片的平均值为200kb,那么您可能仅为您的产品图片消耗2.4GB 。 检查这个目录 magento/media/* 你的产品中有许多未压缩的图像。 你应该 缩小所有图像以压缩使用的大磁盘空间。 试试jpegmini.com 缩小最近从未更新的js和css 。 为您的网站提供更快的性能。 It's ok because with 12k products you have 12k of images at least. if average of t ...
  • 查找大文件(具有名称)的技巧通常是du -a ,通常用于sort -n 。 这最后会为您提供最大的文件(因此小文件从页面顶部消失并不重要)。 你可能还有一个进程仍然在运行时打开一个无名文件,当它有机会时它正在写入,这就是占用空间。 这可能是它打开以存储数据的临时文件,也可能是某人删除的日志文件。 它使用的空间不会显示为可用空间,但它也不会显示为与du -a (或任何其他选项)一起使用,因为没有文件名。 如果您不知道它是哪个进程,则可以使用重新启动来停止进程(所有进程),从而释放空间。 The trick f ...
  • 1)你可以试试WinDirStat: http ://windirstat.info/ 2)我认为您不需要开源工具,只需使用已经提供的语言,就可以用Java或.NET编写。 1) You can try WinDirStat: http://windirstat.info/ 2) I don't think you need open source tools, you could write it in Java or .NET just by using what is already provided ...
  • 经过几轮代码分析,我发现了RAM泄漏的地方。 首先,如果我想经常查询"eng"字段,我应该通过这样做为该字段创建索引: v7.ensure_index([("eng",1),("unique",True)]) 这解决了在未编制索引的"eng"字段中进行连续搜索所花费的时间。 其次,出血RAM问题是由于这个代价高昂的函数调用: doc = {"uid":uid,"eng":src,trglang:trg} if counter == 1000: for i in database.find(): ...
  • 我在Earthscience stackexchange上寻找了一个交叉帖子,但没有看到它。 无论如何,你有两种方法可以减去两个文件,假设它们在跟踪数量,每条跟踪样本和采样率方面是相同的: sudiff file1.su file2.su > diff.su 要么: suop2 file1.su file2.su op=diff > diff.su 它们是等价的。 I looked for a cross-post on the Earthscience stackexchange but didn't ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)