Remove duplicate rows in MySQL

MySQL Cluster

Easiest way to do this is to add a UNIQUE index on the column. When you write the ALTER statement, include the IGNORE keyword. Like so: ALTER IGNORE TABLE jobs ADD UNIQUE INDEX idx_name (site_id, title, company); This will drop all the duplicate rows. As an added benefit, future INSERTs that are duplicates will error … Read more

MySQL Cluster – Core Concept

MySQL Cluster

NDBCLUSTER (also known as NDB) is an in-memory storage engine offering high-availability and data persistence features. The NDBCLUSTER storage engine can be configured with a range of failover and load-balancing options, but it is easiest to start with the storage engine at the cluster level. MySQL Cluster’s NDB storage engine contains a complete set of … Read more

MySQL Cluster Overview

MySQL Cluster

MySQL Cluster is a technology that enables clustering of in-memory databases in a shared-nothing system. The shared-nothing architecture enables the system to work with very inexpensive hardware, and with a minimum of specific requirements for hardware or software. MySQL Cluster is designed not to have any single point of failure. In a shared-nothing system, each … Read more

Client Programming Security Guidelines – MySQL

MySQL Cluster

Applications that access MySQL should not trust any data entered by users, who can try to trick your code by entering special or escaped character sequences in Web forms, URLs, or whatever application you have built. Be sure that your application remains secure if a user enters something like “; DROP DATABASE mysql;”. This is … Read more

General Security Guidelines – MySQL Security

MySQL Cluster

This article describes general security issues to be aware of and what you can do to make your MySQL installation more secure against attack or misuse. Anyone using MySQL on a computer connected to the Internet should read this section to avoid the most common security mistakes. In discussing security, it is necessary to consider fully … Read more

Security Issues With LOAD DATA LOCAL – MySQL Security

MySQL Cluster

The LOAD DATA statement can load a file that is located on the server host, or it can load a file that is located on the client host when the LOCAL keyword is specified. There are two potential security issues with supporting the LOCAL version of LOAD DATA statements: The transfer of the file from … Read more

Asterisk : Select Multiple column from MySQL

asterisk-mysql

Here is an example to select multiple column of a table from select statement in asterisk. exten => h,1,MYSQL(Connect conn localhost username password database) exten => h,n,MYSQL(Query res ${conn} ‘SELECT call_id,callerid,calltime FROM todaycall WHERE calltime=curdate() order by calltime desc limit 1′) exten => h,n,MYSQL(Fetch fid ${r} call_id callerid calltime) exten => h,n,MYSQL(Clear ${r}) exten => … Read more

MySQL : Cheking MySQL replication status

mysql master - slave replication

Once replication has been started it should execute without requiring much regular administration. Depending on your replication environment, you will want to check the replication status of each slave periodically, daily, or even more frequently. Checking Replication Status: The most common task when managing a replication process is to ensure that replication is taking place … Read more