print(vals)
if len(vals) and vals[-1] in ('LISTENING', 'LISTEN'):
    print('OK - MySQL is running.')
else:
    print('Not OK - MySQL is not running.')
how to find out with python on ubuntu if MySQL is running?