[wp-trac] [WordPress Trac] #41722: wpdb::db_connect() does not connect to IPv6 address of mysql server

WordPress Trac noreply at wordpress.org
Wed Sep 13 10:44:38 UTC 2017


#41722: wpdb::db_connect() does not connect to IPv6 address of mysql server
----------------------------------------------------+--------------------
 Reporter:  fierevere                               |       Owner:
     Type:  defect (bug)                            |      Status:  new
 Priority:  normal                                  |   Milestone:  4.9
Component:  Database                                |     Version:  4.8.1
 Severity:  normal                                  |  Resolution:
 Keywords:  has-patch needs-testing has-unit-tests  |     Focuses:
----------------------------------------------------+--------------------

Comment (by birgire):

 Thanks for the update @schlessera

 Glad to hear it worked for you @fierevere

 Just few notes:

 - If we want to take this in smaller steps, we could keep the same non-
 ipv6 code, to be absolutely sure that we're not exluding anything with the
 new patch.
 - Would it make sense and be helpful for the developers reading the code,
 to match the most used db host strings, like localhost, 127.0.0.1 etc,
 before parsing with regex?

 Here's a list of db host strings from the
 [https://codex.wordpress.org/Editing%20wp-config.php#Set_Database_Host
 Codex], maybe helpful in tests?:

 {{{
 Hosting Company                                 DB_HOST Value Guess
 1and1                                           db12345678
 A2 Hosting                                      localhost
 AN Hosting                                      localhost
 Aruba.it                                        localhost or real IP
 provided with activation mail.
 A Small Orange                                  localhost
 AT&T                                            xxxxxxxx.carrierzone.com
 full server name found in PHP MyAdmin.
 BlueHost                                        localhost
 DreamHost                                       mysql.example.com
 GoDaddy - Shared and 4GH Hosting                In the Databases menu go
 to MySQL. To the right of the database name click on Actions and Details.
 The hostname is at the bottom of the window.
 GoDaddy - cPanel Hosting                        localhost
 GoDaddy - Plesk Hosting                         Use the IP address shown
 in the Databases Section in Plesk. Do not include :3306
 HostGator                                       localhost
 ICDSoft                                         localhost:/tmp/mysql5.sock
 Infomaniak (old admin)                          mysql.yourdomain
 Infomaniak                                      In the Dashboard of your
 Web Hosting, go to Databases. The host server is at the top of the window
 (example: xxxx.myd.sharedbox.com)
 InMotion Hosting                                localhost
 iPage                                           username.ipagemysql.com
 IPower                                          username.ipowermysql.com
 Laughing Squid                                  localhost
 MediaTemple Grid                                internal-
 db.s00000.gridserver.com - (Replace "00000" with the actual site number)
 MediaTemple DV                                  localhost
 MegaHost                                        localhost
 NearlyFreeSpeech.Net                            username.db
 NetworkSolutions                                mysqlv5
 one.com                                         example.com.mysql
 pair Networks                                   dbnnnx.pair.com
 QTH.com                                         localhost
 Rackspace Cloud                                 localhost for unmanaged
 servers, variable for Cloud Sites like mysqlXY-
 AB.wcN.dfQ.stabletransit.com where X,Y,A,B,N,Q are variables
 SysFix.eu Power Hosting                         datapower.sysfix.eu
 Site5                                           localhost
 SiteGround                                      localhost
 Vevida.com                                      mysql.example.com, where
 example.com is your own domain name
 Yahoo                                           mysql
 Hosts with cPanel                               localhost
 Hosts with Plesk                                localhost
 Hosts with DirectAdmin                          localhost
 Tophost.it                                      sql.your-domain-name.it
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41722#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list