20

The '...AnyDatabase' roles should be added to the admin database for the user: use admin db.createUser({ user: "mongoadmin" , pwd: "mongoadmin", roles: ["userAdminAnyDatabase", "dbAdminAnyDatabase", "readWriteAnyDatabase"]}) Any database: Database User Roles Database Administration Roles Admin database: Cluster Administration Roles Backup and ...


17

Update: I've posted about this to the AWS forums - please go chime in and ask for it there. At time of writing, Amazon RDS does not support physical replication outside RDS. You can GRANT users the REPLICATION right using an rds_superuser login, but you can't configure replication entries for outside IPs in pg_hba.conf. Furthermore, when you create a DB ...


12

I can guess you have the AutoClose option for database set to True. This is the default behavior when you create a database with Express Editions. The mentioned error can occur exactly in this case. Actually the complete error message 615 states: "Could not find database ID %d, name '%.*ls'. The database may be offline. Wait a few minutes and try again." ......


10

The only time that moving the journal is an absolute recommendation is if you have to use a direct NFS mount - NFS is not recommended for MongoDB in general but in particular it does not play well with the journal. In general, the journal will have quite a different access pattern to the rest of your data (sequential versus random access). Hence it is ...


9

After two hours, I figured it out. Oracle's documentation for the error didn't seem terribly descriptive at first: ORA-24454: client host name is not set Cause: The network host name in files like /etc/hosts was not set. Action: Set the host name and try again. Now, the command worked on my machine (Ubuntu laptop), but it didn't work on EC2. I ...


8

Like most things, it's a cost vs effort/complexity trade-off. RDS is easier, but less flexible, and costs more for the same level of performance. (In particular, note that there's no way to replicate into or out of RDS)


7

you can rename the database using the following command but make sure to take backup first CREATE database new_db_name; RENAME TABLE db_name.table1 TO new_db_name, db_name.table2 TO new_db_name; DROP database db_name; references: http://www.rndblog.com/how-to-rename-a-database-in-mysql/ https://stackoverflow.com/questions/12190000/rename-mysql-database


6

Yes. Think of EC2 as a machine. It has a disk attached - a EBS (Elastic Block Store), and the disk size is your limit. Lets say your ec2 instance has a 20gig disk. If you database grow over 20gig, you will have to resize your attached disk. I am not aware of a auto-scalling method for EC2 disks. But you can simply make a snapshot of a EBS, create another ...


5

For everyone...not just hosting in cloud... According to this presentation from 10gen... http://www.slideshare.net/mongodb/mongodb-journaling-and-the-storage-enginer Journal Performance: On 99.9% read systems, no impact Write performance degraded 5-30% when journal is on the same drive Separate drive as low as 3% It was mentioned in a previous answer......


4

You can combine it on 1 disk, if you wish. Not obligated to split. Journal Journal will take 3GB (or less than 400MB if you use --small-files option) Journal + Pre-Allocation Be aware. If you don't use --small-files, then at least 8GB (journal and oplog included) will be pre-allocated to your disk. This is not lost space, but just reserved to improve the ...


4

For a single instance comparison, not much, but RDS has many advantages, maintenance of a multi-AZ setup with read replicas in different regions, etc. is more than I'd prefer to deal with in EC2. RDS does a tremendous amount of tooling you'd otherwise have to do yourself; this is always a plus. RDS also presents a uniform interface to your databases, in my ...


4

You can pull this off using mysqldump. Here the catch: You cannot ship the data because there may be a cost associated with shipping the data. For this example, let's says you want to rename mydb to ourdb STEP 01 : Create the new database mysql> CREATE DATABASE ourdb; STEP 02 : Get schema without the triggers mysqldump -hrdshost -uuser -ppassword -d -...


3

I got the solution by typing the mongod --smallfiles


3

I have done little testing on EC2 instances, but I have done extensive bench-marking of Oracle RDS instances with and without provisioned IOPS. In my experience the provisioned IOPS deliver close to the advertised performance. Eg. if you provision 1000 IOPS, you will likely peak close to a thousand IOPS with a response time of less than a millisecond, ...


3

Amazon's packages for PostgreSQL will upgrade from 9.1 to 9.2 as if that was a normal minor update. It isn't; see the PostgreSQL version policy, which makes it clear that the major version is "x.y", eg "9.1", "9.2", etc. This version policy may be weird and perhaps unwise, but it's also widely understood and something you would expect packagers to understand....


3

Well, after researching into this and trying out around 20-30 possibly solutions I could not make it work and as far as I can see the limits are set in Aurora and can NOT be changed. Hence the import fails in every single possible solution. I killed the Aurora instance and created a MySQL one, imported without any hiccups right away. The import or log size ...


3

It sounds like you may benefit from a Failover Cluster if all you're looking for is availability. You can run them on standard edition and if you take an N+1 route, you can have two nodes for HA and have one in a DR site ready to take over. You'll need to work on your storage availability for the DR side, but that's a whole other can of worms. Another ...


3

You mention that you used the rpm installer for installing MongoDB on the Amazon Linux AMI. When you do this, the mongod user is created on the system and all of the appropriate files are created and owned by the mongod user. When starting MongoDB installed by the rpm, the command must either be run by root or run using sudo. This is because the init script ...


2

The configuration you describe should be fine. Is there any chance that you're actually attempting to drop the database as a different user? I'd recommend connecting as the test user using SSMS to be 100% sure that you are that user. Also, before dropping the database check you can access some data from it, maybe also test you can put it in to single ...


2

If you expect your traffic to increase you will have to split your web and database layers at some point. So probably would be better to get separate instances for web and database servers now. Then you can start looking into making your web app scalable (so you could add additional web servers under a load balancer to handle traffic peaks) and tuning your ...


2

It's the file size that's the problem. Essentially there's a timeout expiring somewhere, the server logs will tell you where. When the timeout expires, no more data is produced, and after a while with no data the connection gets closed as per normal. The last time I had to tackle something like this (Which is a long time ago now), I wrote a small program ...


2

This is now possible using Logical Replication: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeatureSupport.LogicalReplication


2

We are having a similar problem when we conduct backups. It looks as though the disk reads are maxing out the EBS connection. I think the problem is down to the Throughput limits on an instance type. Check the max bandwidth column here: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html The only solution seems to be switching to a ...


2

You're using mysql 5.1, This means the only engines you'll have available are MyISAM or innodb. in both cases adding a new column, regardless of nullability will require a complete, blocking, table rebuild during alter table. You maybe be able to use the pt-online-schema change tool that does some tricks to rebuild the table in a less blocking manner but ...


2

So you've got two zones. Let's say zone one floods or burns... it's completely gone. All the hardware is destroyed, and the old site isn't even usable. It could be weeks putting it back together. Thankfully, you're still online thanks to zone two. Of course, you might try something like short-term leasing servers to get redundancy back while you put ...


2

Yes you can deploy that scenario to EC2 just as you would if it was VMWare environment. However with AWS I would highly suggest you follow the guidelines on how to properly set this up from Amazon. AWS provides a comprehensive set of services and tools for deploying Microsoft Windows workloads on its reliable and secure cloud infrastructure, such as ...


2

After changing permissions on directories and files don't forget to log out and log back in. I can't still run it as $ service mongod start it can only be run as root. But alternatively you can run it as daemon like this: $ mongod --fork --logpath to/logpath Just to be on the safe side I created data/log directory for logpath. And yes you can create ...


2

You need to apply what MongoDB Docs say: https://docs.mongodb.org/manual/tutorial/transparent-huge-pages/ I installed MongoDB 3.0.8 as couple of months ago and got the same warnings. This setting was set by Amazon. First thing to do is create a script that can enable and disable Transparent Pages. Documentation gives this: #!/bin/sh ### BEGIN INIT INFO # ...


2

First of all, you need to rely on SHOW SLAVE STATUS\G Let's take a sample display from an old answer of mine : MySQL Replication Lag Behaving Erraticly. In the display, please note the items that can help you sense measure replication mysql> show slave status\G *************************** 1. row *************************** Slave_IO_State: ...


2

Ultimately I found that adding extra disks (even raiding it), and changing all the suggested settings from Rolando did not help me. The one thing that did was: sync_binlog=0 This setting will cause mysql to not flush binlogs to disk, but instead let the operating system make this decision. This might not be as safe as letting mysql do it, so use at your ...


Only top voted, non community-wiki answers of a minimum length are eligible