MySQL Generate random data walkthrough:
Random number between 0 (inclusive) and 1 exclusive:
mysql> select rand();
+--------------------+
| rand()             |
+--------------------+
| 0.5485130739850114 |
+--------------------+                                                     
1 row in set (0.00 sec)
Random int between 0 (inclusive) and 10 exclusive:
mysql> select floor(rand()*10);
+------------------+
| floor(rand()*10) |
+------------------+
|                6 |
+------------------+
1 row in set (0.00 sec)
Random letter or number:
mysql> select concat(substring('ABCDEF012345', rand()*36+1, 1));
+---------------------------------------------------------------------------+
| concat(substring('ABCDEF012345', rand()*36+1, 1))                         |
+---------------------------------------------------------------------------+
| F                                                                         |
+---------------------------------------------------------------------------+
1 row in set (0.00 sec)
Random letter a to z:
mysql> select char(round(rand()*25)+97);
+---------------------------+
| char(round(rand()*25)+97) |
+---------------------------+
| s                         |
+---------------------------+
1 row in set (0.00 sec)
Random 8 character alphanumeric string:
mysql> SELECT LEFT(UUID(), 8);
+-----------------+
| LEFT(UUID(), 8) |
+-----------------+
| c26117af        |
+-----------------+
1 row in set (0.00 sec)
Random capital letter in MySQL:
mysql> select CHAR( FLOOR(65 + (RAND() * 25)));
+----------------------------------+
| CHAR( FLOOR(65 + (RAND() * 25))) |
+----------------------------------+
| B                                |
+----------------------------------+
1 row in set (0.00 sec)
Load a random row into a table:
mysql> create table penguin (id INT primary key auto_increment, msg TEXT);
Query OK, 0 rows affected (0.02 sec)
mysql> insert into penguin values (0, LEFT(UUID(), 8));
Query OK, 1 row affected (0.00 sec)
mysql> select * from penguin;
+------+----------+
| id   | msg      |
+------+----------+
|    0 | abab341b |
+------+----------+
1 row in set (0.00 sec)
Load random rows:
Make a procedure called dennis that loads 1000 random rows into penguin.
mysql> delimiter ;;
mysql> drop procedure if exists dennis;;
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> create procedure dennis()
    -> begin
    -> DECLARE int_val INT DEFAULT 0;
    -> myloop : LOOP
    ->   if (int_val = 1000) THEN
    ->     LEAVE myloop;
    ->   end if;
    ->   insert into penguin values (0, LEFT(UUID(), 8));
    ->   set int_val = int_val +1;
    -> end loop;
    -> end;;
Query OK, 0 rows affected (0.00 sec)  
mysql> call dennis();;
mysql> select * from penguin;;
+------+----------+                      
| id   | msg      |              
+------+----------+                   
|    0 | abab341b |                 
|    1 | c5dc08ee |           
|    2 | c5dca476 |
...
+------+----------+
Update all rows in a table to have random data:
mysql> create table foo (id INT primary key auto_increment, msg TEXT);
Query OK, 0 rows affected (0.02 sec)
mysql> insert into foo values (0,'hi');
Query OK, 1 row affected (0.00 sec)
mysql> insert into foo values (0,'hi2');
Query OK, 1 row affected (0.00 sec)
mysql> insert into foo values (0,'hi3');
Query OK, 1 row affected (0.00 sec)
mysql> select * from foo;
+----+------+
| id | msg  |
+----+------+
|  1 | hi   |
|  2 | hi2  |
|  3 | hi3  |
+----+------+
3 rows in set (0.00 sec)
mysql> update foo set msg = rand();
Query OK, 3 rows affected (0.00 sec)
Rows matched: 3  Changed: 3  Warnings: 0
mysql> select * from foo;
+----+---------------------+
| id | msg                 |
+----+---------------------+
|  1 | 0.42576668451145916 |
|  2 | 0.6385560879842901  |
|  3 | 0.9154804171207178  |
+----+---------------------+
3 rows in set (0.00 sec)
     
    
CONCAT.