def create_slurm_db_connection(host, port, user, password, db):
    '\n    Creates the connection to the database (MySQL) so it can be queried\n    \n    Parameters\n    ----------\n    host : string\n        hostname on which is located the DB\n    port : integer\n        port on which the connection is to be established\n    user : string\n        user name with which the connection is to be established\n    password : string\n        password of the user on the database (of the user `user`)\n    db : string\n        name of the database which will be queried\n\n    Returns\n    -------\n    PyMySQL Connection object\n    '
    connection = pymysql.connect(host=host, port=port, user=user, password=password, db=db)
    print('[+] Slurm accounting DB connection is up! [+]')
    return connection
Creates the connection to the database (MySQL) so it can be queried

Parameters
----------
host : string
    hostname on which is located the DB
port : integer
    port on which the connection is to be established
user : string
    user name with which the connection is to be established
password : string
    password of the user on the database (of the user `user`)
db : string
    name of the database which will be queried

Returns
-------
PyMySQL Connection object
def create_slurm_db_connection(host, port, user, password, db):
    '\n    Creates the connection to the database (MySQL) so it can be queried\n    \n    Parameters\n    ----------\n    host : string\n        hostname on which is located the DB\n    port : integer\n        port on which the connection is to be established\n    user : string\n        user name with which the connection is to be established\n    password : string\n        password of the user on the database (of the user `user`)\n    db : string\n        name of the database which will be queried\n\n    Returns\n    -------\n    PyMySQL Connection object\n    '
    connection = pymysql.connect(host=host, port=port, user=user, password=password, db=db)
    print('[+] Slurm accounting DB connection is up! [+]')
    return connection