MongoDB : introduction to MongoDB

mongoDB

MongoDB is an  is a cross-platform open-source document database, and the leading NoSQL database. Written in C, C++ and Java script . MongoDB features: 1. Document-Oriented Storage » JSON-style documents with dynamic schemas offer simplicity and power. 2. Ad hoc queries MongoDB supports search by field, range queries, regular expression searches. Queries can return specific fields of documents and also … Read more

MySQL Master-Master-Slave-Slave Replication

Here we are going to create a Master -> Master -> Slave -> Slave replications architecture. I am expecting here , you have MySQL installed and set-up as normal.       Master 1 will be known as Master 1 and Slave 2 with IP 10.1.1.1 Master 2 will be known as Master 2 and Slave 1 … Read more

convert time in seconds to HH:MM:SS format in MySQL?

You can use MySQL function SEC_TO_TIME(). Example: SELECT SEC_TO_TIME(2378); Output is: 00:39:38  

Resolved : mysql replica : Relay log read failure: Could not parse relay log event entry.

I’m not sure what the root cause may be. But to recover from this situation, you’d want to instruct MySQL to clear out all the relay-bin-logs beyond the following point Relay_Master_Log_File: mysql-bin.000xxx Exec_Master_Log_Pos: 143983426 by doing the following: mysql> STOP SLAVE; mysql> CHANGE MASTER TO MASTER_LOG_FILE = ‘mysql-bin.000xxx’, MASTER_LOG_POS = 143983426; mysql> START SLAVE;      

Difference between Stored Procedure and Function : SQL Server

function vs stored procedure

Stored Procedures are pre-compile objects which are compiled for first time and its compiled format is saved which executes (compiled code) whenever it is called. But Function is compiled and executed every time when it is called. For more about stored procedure and function refer the articles Different types of Stored Procedure and Different types … Read more

Failed to connect to MySQL-asterisk

Files need to check are: /etc/asterisk/res_odbc.conf /etc/odbcinst.ini To resolve this , You have to check the correct configuration of above file. For Example : in —  /etc/odbcinst.ini [MySQL] Description = ODBC for MySQL Driver = /usr/lib/libmyodbc3.so Setup = /usr/lib/libodbcmyS.so FileUsage = 1 or [asterisk-connector] Description = MySQL connection to ‘asterisk’ database Driver = MySQL Database … Read more

Import large csv file using phpMyAdmin

phpmyadmin error

Getting Error while upload large file from phpMyAdmin: Soution: change the memory limit in php.ini file both upload_max_filesize and post_max_size also. Then restart the httpd service (web service)    

MySQL Skip Duplicate Replication Errors : skip replication error

mysql master - slave replication

Normally MySQL replication will stop whenever there is an error running a query on the slave. This happens in order for us to be able to identify the problem and fix it, and keep the data consistent with the mater that has sent the query. You can skip such errors, even if this is not recommended, as … Read more

Managing Views in MySQL : Showing mysql view definition

Summary: in this tutorial, you will learn how to manage views in MySQL including displaying, modifying and removing views. Show view definition in MySQL MySQL provides the SHOW CREATE VIEW statement that helps you show view definition. The following is the syntax of the SHOW CREATE VIEW statement:   1 SHOW CREATE VIEW [database_name].[view_ name]; To display the definition of a … Read more