Move db connection to the script.