Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

MongoDB Administration Checklist for MySQL DBAs

DZone's Guide to

MongoDB Administration Checklist for MySQL DBAs

If you are MySQL DBA, starting MongoDB administration is not always an easy transition. This post provides a checklist for MongoDB administrators who are familiar with MySQL.

· Database Zone
Free Resource

Finding a database that fits with a container-based deployment model can be frustrating. Learn what to look for in a Docker database

In this blog, I discuss a MongoDB administration checklist designed to help MySQL DBAs.

If you are MySQL DBA, starting MongoDB administration is not always an easy transition. Although most of the concepts and even implementation are similar, the commands are different. The following table outlines the typical MySQL concepts and DBA tasks (on the left) to corresponding MongoDB ones (on the right). If you happen to be a MongoDB DBA and want to learn MySQL administration, you can use the same table looking from right to left.

I’ve also created a webinar, MongoDB administration for MySQL DBA, that explains the above concepts. You can download the slides to use as a reference.

Don’t forget about our upcoming event Community Open House for MongoDB in New York, June 30, 2016. There will be technical presentations and sessions from key members of the MongoDB open source community. This event is free of charge and open to all.

Architecture: Basic Concepts

Replication:
MySQL_MongoDB_replication

Sharding:

MySQL_MongoDB_sharding

Day-to-day Operations
 

MySQL: SELECT

select*from zips limit1G

country_code:US

postal_code:34050

place_name:FPO

admin_name1:

admin_code1:AA

admin_name2:Erie

admin_code2:029

admin_name3:

admin_code3:

latitude:41.03750000

longitude:-111.67890000

accuracy:

1row inset(0.00sec)

MongoDB: FIND


MongoDB shell version:3.0.8

connecting to:zips

>db.zips.find().limit(1).pretty()

"_id":"01001",

"city":"AGAWAM",

"loc":[

-72.622739,

42.070206

"pop":15338,

"state":"MA"


MongoDB:

/etc/mongod.conf

# Where and how to store data.

storage:

dbPath:/datawt

journal:

enabled:true

engine:wiredTiger

...

/usr/bin/mongod-f/etc/mongod.conf


mlogvis_example

MySQL 5.7: GIS

SELECT osm_id,name,

round(st_distance_sphere(shape,

st_geomfromtext(

'POINT (-78.9064543 35.9975194)',1)

),2)asdist,

st_astext(shape)

FROM points_new

WHERE 

st_within(shape,

create_envelope(@lat,@lon,10))

and(other_tags 

like'%"amenity"=>"cafe"%'

orother_tags 

like'%"amenity"=>"restaurant"%')

andname isnotnull

ORDER BY dist asc LIMIT10;


  • Backup: mysqldump -A > dump.sql, restore: mysql < dump.sql
  • Stop replication slave, copy files
  • Percona XtraBackup

MongoDB: Backup

  • Backup: mongodump, restore mongorestore
  • Stop replica, copy files
  • Percona HotBackup for TokuMX only

When you're looking for a SQL database that can scale elastically, while still preserving ACID guarantees, you only have a few choices. Find out how these elastic SQL databases perform in thishead-to-head YCSB benchmark.

Topics:
dba ,administration ,mysql ,mysql administration ,mongodb ,checklist

Published at DZone with permission of Alexander Rubin, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}