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”)…
[ERROR] /usr/sbin/mysqld: Can’t find file: ‘./mysql/host.frm’ (errno: 13) [ERROR] Fatal error: Can’t open and lock privilege tables: Can’t find file: ‘./mysql/host.frm’ (errno: 13) We usually see above errors while we’re trying to start an additional MySQL instances on the…
[ root @ dbversity : /tmp ] [ root @ dbversity : /tmp ] ll -lhtr MySQL-5.6.25-1.el6.x86_64.rpm-bundle.tar -rw-r–r– 1 sm70768 mongod 213M Jun 22 08:25 MySQL-5.6.25-1.el6.x86_64.rpm-bundle.tar [ root @ dbversity : /tmp ] [ root @ dbversity : /tmp…
How Wired is MongoDB + WiredTiger? MongoDB 3.0 is a major release with long awaited improvements. The most notable? The optional storage engine WiredTiger. After all, WiredTiger was founded by the people behind Berkeley DB. MongoDB claims WiredTiger write performance…
A Technical Introduction to WiredTiger Document-level Concurrency In-memory performance Multi-core scalability Checksums Compression Durability with & without journaling MongoDB 3.0 introduces a new pluggable storage engine API and a new storage engine called WiredTiger. The engineering team behind WiredTiger…
[ root @ dbvesitydotcom : ~ ] mongo MongoDB shell version: 2.6.5 connecting to: test > > > use dbversity_db switched to db dbversity_db > > db.mycol.insert({L1F1:”val1″,L1F2:[{L2F1:”val2″,L2F2:”val3″,L2F3:[{L3F1:”val50″, L3F2:”val51″,L3F3:”val52″},{L3F1:”val53″, L3F2:”val54″,L3F3:”val55″}]},{L2F4:”val4″,L2F5:”val5″}]}) WriteResult({ “nInserted” : 1 }) > > > db.mycol.find().pretty() { …
[root@localhost apache2]# cat ../apache.py __author__ = ‘root’ #!/usr/bin/python import re import sys from datetime import datetime, date, timedelta from collections import Counter # Define the day of interest in the Apache common log format. try: daysAgo = int(sys.argv[1]) except:…
[root@localhost utils]# pwd /root/Documents/dbversity/utils [root@localhost utils]# [root@localhost utils]# [root@localhost utils]# ll -lhtr total 20K -rw-r–r–. 1 root root 0 Jun 8 14:24 _init_.py -rw-r–r–. 1 root root 95 Jun 8 14:35 new_function.py -rw-r–r–. 1 root root 77 Jun 8 14:54…