ReplicaSet 1 (rs1) : =================== ./mongod –shardsvr –replSet rs1 –dbpath /data/rs1_1 –logpath /data/rs1_1/rs1_1_mongod.log –port 27010 –smallfiles –nojournal –quiet & ./mongod –shardsvr –replSet rs1 –dbpath /data/rs1_2 –logpath /data/rs1_2/rs1_2_mongod.log –port 27011 –smallfiles –nojournal –quiet & ./mongod…
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group lookup_servers mysql-ha-group Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e Time-To-Live: 1 server_uuid address status mode weight ———————————— ——————- ——- ———- —— 4a914fd4-1eec-11e5-972b-005056bb627d 10.116.175.107:3306 PRIMARY READ_WRITE 1.0 [ root @ vm-5cc5-bad6 : ~ ] [ root…
__system¶ MongoDB assigns this role to user objects that represent cluster members, such as replica set members and mongos instances. The role entitles its holder to take any action against any object in the database. Do not assign this role…
MySQL Fabric is built around an extensible and open source framework for managing farms of MySQL Servers. Currently two features have been implemented – High Availability (built on top of MySQL Replication) and scaling out using data sharding. These features…
[ root @ dbversity : /tmp ] cat mysql_fresh_start.sh service mysql stop & sleep 10; cd /var/lib/mysql rm -rf /var/lib/mysql/* mysql_install_db & sleep 10; chown mysql:mysql /var/lib/mysql/ -R echo -e “\n” service mysql start & sleep 5; echo -e “\n”…
[root@ip-10-0-0-28 /]# ps -ef | grep mongo root 7135 2216 0 01:26 pts/0 00:00:00 mongod –replSet rs2 –dbpath /root/data4 –logpath /root/data4/mongod1.log –port 27010 –smallfiles –nojournal root 7191 2216 0 01:26 pts/0 00:00:00 mongod –replSet rs2 –dbpath /root/data5 –logpath /root/data5/mongod2.log –port…
MySQL Fabric is a framework for managing groups of MySQL Servers and using those servers to provide services. It is designed to be extensible so that over time many different services can be added. In the current version the services…
When we need to count the number of subdocuments based on certain criteria, including a date field. Looking for options on how best to handle the date field for this requirement. Sample document: { “_id” : “FCa123”, “txnUidSid” : “123”,…
Master: 1. Install MySQL as per the standard procedure 2. Edit my.cnf of Master server with below parameters server-id = 8 # Should be unique id between 2 and 2^32 – 1 log-bin = /home/mysql5/mysql-binlogs/’hostname’binlog # required for replication log-bin-index…
How to truncate/chop off time-stamp from Date > db.dbversity.find({},{tradeDate:1}) { “_id” : “1”, “tradeDate” : ISODate(“2015-06-25T18:30:00Z”) } { “_id” : “2”, “tradeDate” : ISODate(“2015-06-25T18:30:00Z”) } { “_id” : “3”, “tradeDate” : ISODate(“2015-06-24T18:30:00Z”) } { “_id” : “4”, “tradeDate” : ISODate(“2015-06-23T18:30:00Z”)…