$ pg_dump -U {user-name} {source_db} -f {dumpfilename.sql} Restore: $ psql -U {user-name} -d {desintation_db}-f {dumpfilename.sql...
Count number of records in array: db.data_records.count( { dataset_id: { $in: [ 2509, 2224, 2128, 2145, 2472, 2249 ] } } ) Count number of records...
var collectionNames = db.getCollectionNames(), stats = []; collectionNames.forEach(function (n) { stats.push(db[n].stats()); }); stats = stats.sort(function(a, b) { return b['size'] - a...
backup: # mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql restore:# mysql -u root -p[root_password] [database_name] < dumpfilename.sql
SELECT table_schema 'DB Name', round(Sum(data_length + index_length) / 1024 / 1024, 1) 'DB size in MB' FROM information_schema.tables...
mysql>CREATE DATABASE memcachedSample; mysql>CREATE USER 'web20'@'localhost' IDENTIFIED BY 'web20'; mysql>GRANT ALL PRIVILEGES ON memcachedSample.* TO 'web20...
mongod --dbpath /srv/mongodb/
SELECT AUTO_INCREMENT FROM information_schema.TABLES WHERE TABLE_SCHEMA = "databaseName" AND TABLE_NAME = "tableName" alter table tablename auto_increment = newvalue
SELECT table_schema "Data Base Name", sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB",
No results found in other decks.