Tag Archives: Mysql-tutorial

Event scheduler in MySQL 5.1

I just recently used Event scheduler which was the major feature in MySQL 5.1 version. Its very much similar to the linux crontab functionality. MySQL Event is nothing but a bunch of statements which we can run on specific schedule. When you will create any event, its just a database object like table, view or Continue Reading

Some guidelines for MySQL security

Don’t share root user password and mysql.user table acess with anyone till you have full trust on it. Because that encrypted password is real password in MySQL so if anyone knows that than he/she can easily login with any user if he has access to his host. Check with “mysql -uroot ” command, If you Continue Reading

some facts about MyISAM file handling and .MYI file In MySQL

Some facts about MyISAM File handling: • If a table is never updated, MySQL will never touch the table files, so it would never be marked as closed or corrupted. • If a table is marked readonly by the OS, it will only be opened in readonly mode. Any updates to it will fail. • Continue Reading

Limitations of partitioning in MySQL 5.1

Some limitations of partitioning in MySQL 5.1 on one page. All columns used in the partitioning expression for a partitioned table must be part of every unique key that the table may have.These rules also apply to existing nonpartitioned tables that you wish to partition. Partitioning applies to all data and indexes of a table; Continue Reading

How FLUSH TABLES works in MySQL

“FLUSH TABLES” is generally used for closing all tables by force in MySQL. Its really interesting that how mysql do this. Most of time we are doing this because someone adds new tables outside of MySQL. (Like for MyISAM tables, we are copying .FRM, .MYD and .MYI files. We can do this when MySQL is Continue Reading

How MySQL does sorting with Order By

There are two filesort algorithms in MySQL for sorting and retriving select queries results. 1. Original Filesort Algorithm : This method uses only the ORDER BY columns. (prior to MySQL 4.1) 2. Modified Filesort Alforithm : This method uses ORDER BY columns and the columns which are used in query. (MySQL 4.1 and newer version) Continue Reading