Added MySQL database interface to monitor_userdevices.py