MySQL- SUBSTRING_INDEX – Select Patterns

Consider, a MySQL table having values in a column like below: SELECT location  FROM geo LIMIT 3; “location” “India.Karnataka.Shimoga.Gopala” “India.Karnataka.Bengaluru.BTM” “India.Karnataka.Chikmaglore.Koppa” My requirement is to take only 4th value from each of the rows(such as, Gopala,BTM,Koppa). I don’t want to…

MySQL’s INTO OUTFILE for loading file

MySQL: SELECT / LOAD in Batch Here’s are the MySQL commands to extract data from  table and to load data into tables. Unlike other DBMS, MySQL offers SELECT..INTO.. and LOAD DATA.. commands are quite faster and convenient. Data would be…

How do we exclude SQL from replicating in MySQL

If you’re using MySQL Replication, in rare cases you may require to skip a particular SQL statement from replicating – which is to be executed on Master and should not be on the Slave. Though, its not a good practice!…

MySQL Installation

While you have a basic idea about MySQL, I would recommend the real-time trial and error than just reading out. For that, download a latest stable community version of MySQL from the official website. Though MySQL is platform independent, its…

MongoDB vs MySQL

Here is a comparison between MongoDB and Relational database, MySQL:   Because of distributed key value store, MapReduce calculation capability and document oriented NoSQL features, MongoDB® is The database for Big Data processing.

MySQL – Optimization Overview

The most important part for getting a system fast is of course the basic design. You also need to know what kinds of things your system will be doing, and what your bottlenecks are. The most common bottlenecks are: Disk…

MySQL Replication Setup On Linux

Introduction: The purpose of this document is to describe the procedure to configure various replication setups. Guidelines: • It is recommended to take MySQL dump on master server when there is no activity. However it is not possible to stop…

Writing database commands output to a file using Linux `tee` Command.

# mysql -u root -h 127.0.0.1 Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.5.8 MemSQL source distribution (compatible; MySQL Enterprise & MySQL Commercial) Copyright (c) 2000, 2011, Oracle…

MySQL DBA Complete reference book

You can download MySQL DBA complete reference from below link http://dbversity.com/wp-content/uploads/2014/10/MySQL_DBA_Complete_Reference.doc