-Before doing anything you have to backup your Data See this guide here
Downloads :-Odin Flashing Tool
-Root+Recovery+Kernel zip FileStep by step root for Samsung Galaxy S4 mini:1-Make sure that you had install the
necessary Samsung drivers on your PC
2-Open Odin Software.
3-Connect your
Samsung Galaxy S4 mini via original USB cable to the computer.
4-Enable the
USB Debugging mode.
5-Enter Download mode
Press and hold home, volume down and power. Download screen should appear.
6-Start Odin, make sure "F. Reset Time" is not checked, and then click PDA button to select the recovery image.
Select "
ROOT_I9192_CWM6_Kernel.tar" file, and press Start button. The phone will reboot when finished flashing a new kernel and recovery.
7-Reboot into recovery mode and select the option to install the ZIP file you have previously copied to your device and begin flashing it.
8-After flashing using CWM, reboot into system and enjoy your rooted device.
9-Check the root with
root checker here