To select a random set of records from mysql, use the following statement:

SELECT * FROM table_name ORDER BY RAND() limit 5;

A random set of 5 records should be returned by the query.