php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #70955 bind mysql client connection to specific ip
Submitted: 2015-11-22 16:32 UTC Modified: 2016-11-23 13:40 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: theultramage at gmail dot com Assigned: mysql (profile)
Status: Assigned Package: MySQLi related
PHP Version: 5.6.15 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
5 + 23 = ?
Subscribe to this entry?

 
 [2015-11-22 16:32 UTC] theultramage at gmail dot com
Description:
------------
Libmysql documentation mentions that mysql_options(MYSQL_OPT_BIND, "hostname_or_ipaddress") exists since MySQL 5.6.1 (2011). This solves the problem of connecting from a host with multiple IPs, because otherwise the host's current default interface is used; this is decided by the operating system and it may change over time. MySQL server is especially sensitive to this since logins are tied to IP addresses.

PHP's mysql, mysqli and pdo_mysql interfaces don't seem to expose this functionality.


Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-11-24 05:49 UTC] laruence@php.net
-Assigned To: +Assigned To: mysql
 [2015-11-24 05:49 UTC] laruence@php.net
it's better also have mysqlnd's supports, assign to mysql team , thanks
 [2016-11-23 13:40 UTC] cmb@php.net
-Package: MySQL related +Package: MySQLi related
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 16 08:01:33 2024 UTC