Believed fixes for Mysqli driver IPv6

I seen someone had an error, not had time to test the code, a bit
scruffy but hopefully it will work.

* This is my first ever commit to a project let me know if I have done
anything wrong *