﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	focuses
41722	wpdb::db_connect() does not connect to IPv6 address of mysql server	fierevere	pento	"There is currently no way to make WordPress to connect to MySQL server using IPv6 address

{{{#!php
<?php
define('DB_HOST', '::1');
}}}

Error establishing a database connection

in brackets:

{{{#!php
<?php
define('DB_HOST', '[::1]');
}}}

Error establishing a database connection


the only way it works by defining a hostname in /etc/hosts and then connecting to it, but its not available option on shared hosting when you dont have control over files in /etc/

quoting @sergeybiryukov :


{{{
wpdb::db_connect() appears to treat everything after : as a port or socket:
https://core.trac.wordpress.org/browser/tags/4.8.1/src/wp-includes/wp-db.php?marks=1517-1535#L1504

}}}
"	defect (bug)	closed	normal	4.9	Database	4.8.1	normal	fixed	has-patch needs-testing has-unit-tests		
