rds

[mysql]-xtrabackup恢复阿里云RDS

若如初见. 提交于 2019-12-16 07:57:43
上个周末上新项目 迁移数据库30个G的库 迁移了2次耗时1天.感觉效率太低,想用xtrabackup恢复,发现之前mysql5.6和mysql8.0的文章写得潦草.自己一时半会也有点看不懂了.于是重写一遍5.7的 这边使用内存1G 差不多1个小时就恢复30G的数据,使用dump恢复需要至少4小时半天 首先安装Percona XtraBackup 安装yum 源 Mysql5.7 安装2.4 版本。 yum install https://repo.percona.com/yum/percona-release-latest.noarch.rpm yum install -y percona-xtrabackup-24.x86_64 本地服务器安装mysql5.7.x版本 安装过程省略 1普通恢复 备份本地自建数据库数据并恢复 通过percona xtrabackup备份原有数据 mkdir /home/bak innobackupex --defaults-file=/etc/my.cnf --user=root --password='Hangzhou@123' /home/bak/ 停止mysql 并 备份原有data文件夹 service mysqld stop mv /usr/local/mysql/data /usr/local/mysql/data_bak

Difficulty in finding the Region names in AWS rds

ε祈祈猫儿з 提交于 2019-12-13 18:45:31
问题 How to get the names of all the rds instances in AWS using a boto script. I want to write a python script that fetches all the regions and then displays their dbinstances. 回答1: The following should give you all of the available regions for RDS. import boto.rds regions = boto.rds.regions() Which would return a list of RegionInfo objects like this. [RegionInfo:us-east-1, RegionInfo:cn-north-1, RegionInfo:ap-northeast-1, RegionInfo:eu-west-1, RegionInfo:ap-southeast-1, RegionInfo:ap-southeast-2,

Finding ansible RDS instances

随声附和 提交于 2019-12-13 01:05:07
问题 I am trying to configure with ansible my EC2 instances dynamically. I am having a problem working out how to find my RDS instances. I can set key tags but ansible ec2.py doesn't pick them up (https://github.com/ansible/ansible/issues/7564). Does any one have any suggestions? So for instance I want an RDS instance for production, staging and for just for testing. 回答1: If you mean the ansible ec2.py inventory script doesn't pick up RDS instances then yes I believe you're right, it will only

Is my encrypted AWS database really encrypted?

做~自己de王妃 提交于 2019-12-12 10:19:57
问题 I am experimenting with AWS, creating a MySQL encrypted database. I have migrated a database there to test it with an application and noticed the data is completely readable although the configuration in AWS says the database is encrypted. I am just wondering if that is the way it should be. Doubt it. I connected using a MySQL standard client so I didn't expect it to be readable. Any clues on this would be great. 回答1: An encrypted database simply means that the files on permanent storage are

How to connect to an RDS database from Yii2?

落爺英雄遲暮 提交于 2019-12-12 06:36:15
问题 I have deployed a Yii2 based app onto AWS Elastic Beanstalk, also I have created the RDS instance with a database (it already has tables) on Elastic Beanstalk. However I received this error: "SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known" All the files are uploaded correctly to the AWS instance. The file /common/config/main-local.php has: 'components' => [ 'db' => [ 'class' => 'yii\db\Connection', 'dsn' => 'mysql:host=', 'dsn' => 'mysql:host

Simple schdule php script insert records twice while connecting to remote database

ぃ、小莉子 提交于 2019-12-12 03:45:43
问题 This is the php implementation of the same scheduler. I made this php implementation, because I thought I have issue with nodejs async nature. Unfortunately, they have the same issue. This may indicate that something wrong with my logic or mysql. I had hard time to figure why. I have 10 commands stored in schedule table. When the day code, hour and minute are matching up with current day code, hour and minute. Those commands will copy into command table. This relies on the scheduler I am

Analyzing slow mysql server

不打扰是莪最后的温柔 提交于 2019-12-11 19:38:26
问题 I have noticed that my mysql instance on Amazon's RDS is running quite slow. When I run: SELECT NOW() From my local computer, it takes 0.2ms to run. When I run that same query on rds, it takes 35.1ms to run -- even running these multiple times to rule out caching it's about that value. What are some things I can do or tools I can use to figure out why the rds server is running so slow? 来源: https://stackoverflow.com/questions/32164995/analyzing-slow-mysql-server

Timezone awareness differences between System TZ and DB TZ?

北城以北 提交于 2019-12-11 08:01:59
问题 I am currently migrating a database from a local MySQL host to Aurora in RDS. Checking the time zone settings on both systems using: SELECT @@system_time_zone, @@global.time_zone, @@session.time_zone, NOW(), UTC_TIMESTAMP(); Local Mysql +--------------------+--------------------+---------------------+---------------------+---------------------+ | @@system_time_zone | @@global.time_zone | @@session.time_zone | NOW() | UTC_TIMESTAMP() | +--------------------+--------------------+---------------

Why can't I stop RDS instance?

只愿长相守 提交于 2019-12-10 18:20:33
问题 I spun up two RDS instances in the same VPC. Both are postgresql. While the m4.xlarge one has multi-AZ enabled and is encrypted. The t2.micro has either. That is the only difference between the two instances. It is strange that t2.micro instance can be stopped but m4.xlarge can't. The "stop" option is grayed out for m4.xlarge. Why can't I stop this one? Does it have to do with the multi-AZ thing? 回答1: You can't stop a DB instance that is in a Multi-AZ deployment. http://docs.aws.amazon.com

EC2 instance can't connect to RDS, from same VPC/Subnet

本秂侑毒 提交于 2019-12-10 13:45:20
问题 I have one EC2 instance that can connect to RDS, and another that can't. They are in the same VPC/Subnet/AZ They have the same IAM role They have different (but similar) security groups, both allow all inbound The subnets are showing in the configuration for the RDS instance The ec2 instance that can't connect just times out What could be going wrong? Is there any way to work out where the connection is failing? 来源: https://stackoverflow.com/questions/43898381/ec2-instance-cant-connect-to-rds