General Security Guidelines – MySQL Security

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

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

How MySQL Optimizes WHERE Clauses

Some of the optimizations performed by MySQL on where clauses as follow: Removal of unnecessary parentheses: ((a AND b) AND c OR (((a AND b) AND (c AND d)))) To (a AND b AND c) OR (a AND b AND c AND d) Constant folding: (a<b AND b=c) AND a=5 To b>5 AND b=c AND … Read more

Optimizing MySQL SELECT statements

The core logic of a database application is performed through SQL statements, whether issued directly through an interpreter or submitted behind the scenes through an API. The tuning guidelines of this post will help to speed up all kinds of MySQL applications. The guidelines cover SQL operations that read and write data, the behind-the-scenes overhead … Read more

MySQL Optimization Part 1

Database performance depends on several factors at the database level, such as tables, queries, and configuration settings. These software constructs result in CPU and I/O operations at the hardware level, which you must minimize and make as efficient as possible. As you work on database performance, you start by learning the high-level rules and guidelines … Read more

MySQL Server Logs : Error log and General Query Log

MySQL Server has several logs that can help you find out what activity is taking place. By Default , No Logs are enabled in MySQL. By default, the server writes files for all enabled logs in the data directory. Logs can be flush by Issuing FLUSH LOGS statement. Binary log is flushed when its size … Read more

MYSQL Partitioning : What is and HOW To ?

The idea behind partitioning isn’t to use multiple servers but to use multiple tables instead of one table. You can divide a table into many tables so that you can have old data in one sub table and new data in another table. Then the database can optimize queries where you ask for new data … Read more