Uses SSL by default, falls back to no SSL, fixes schema that could be null

@nickgartmann @jeregrine 
i guess id like to see an `int(timeout or 60)` here. not sure why they chose to do it above and not below