473,386 Members | 1,886 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

PHP Mysql-API using IPv6

Hi,

I'm trying to connect to a mysql-Server using PHP's mysql-function
mysql_connect. The host on which the mysql-server is running is not the
same as the host apache and php are running on. The two computers are
connected in an IPv6-network.
No matter if I give the hostname (defined in /etc/hosts), the
IPv6-address ("fec0::4") or the IPv6-address in square brackets
("[fec0::4]") the function mysql_connect always prints "Unknown
MYSQL-Server [servername]". Is it because of IPv6? Is PHP's mysql-API
not capable of connecting via an IPv6-network? Unfortunately I didn't
find anything about it in the documentation.
I'm using PHP version 4.3.4. In case this version cannot handle
IPv6-addresses, does anybody know whether PHP 5 beta can?

Thank you for your help!

Torsten
Jul 17 '05 #1
7 5870
Torsten Schmidt <gi********@yahoo.co.uk> wrote:
I'm trying to connect to a mysql-Server using PHP's mysql-function
mysql_connect. The host on which the mysql-server is running is not the
same as the host apache and php are running on. The two computers are
connected in an IPv6-network.
Since when does mysql support ipv6?
Is it because of IPv6? Is PHP's mysql-API
not capable of connecting via an IPv6-network?


Have you tried mysql's client instead of the buildin (which is really
old code IIRC)?

--

Daniel Tryba

Jul 17 '05 #2
Daniel Tryba wrote:
Torsten Schmidt <gi********@yahoo.co.uk> wrote:
I'm trying to connect to a mysql-Server using PHP's mysql-function
mysql_connect. The host on which the mysql-server is running is not the
same as the host apache and php are running on. The two computers are
connected in an IPv6-network.
Since when does mysql support ipv6?
Have you tried mysql's client instead of the buildin (which is really
old code IIRC)?


Yes I did. It doesn't work with mysql's client but I thought it's
because the client is too old (I tried the mysql-client from the current
debian-stable release which is version 3.23 and really old).

But I don't know if MySQL Server does support IPv6. Does the server need
to explicitly support it, too? That's a good point... If that's the
reason for not working, is there another open source DB out there that
does support IPv6?

Torsten
Jul 17 '05 #3
Good question. I would think so, since the data structures passed to socket
functions are different from those of IPv4.

Uzytkownik "Torsten Schmidt" <gi********@yahoo.co.uk> napisal w wiadomosci
news:bv************@uni-berlin.de...
But I don't know if MySQL Server does support IPv6. Does the server need
to explicitly support it, too? That's a good point... If that's the
reason for not working, is there another open source DB out there that
does support IPv6?

Torsten

Jul 17 '05 #4
There must be some way though, to route an IPv4 address to an IPv6 address.
You might want to try the TCP/IP newsgroup.

Uzytkownik "Torsten Schmidt" <gi********@yahoo.co.uk> napisal w wiadomosci
news:bv************@uni-berlin.de...
Yes I did. It doesn't work with mysql's client but I thought it's
because the client is too old (I tried the mysql-client from the current
debian-stable release which is version 3.23 and really old).

But I don't know if MySQL Server does support IPv6. Does the server need
to explicitly support it, too? That's a good point... If that's the
reason for not working, is there another open source DB out there that
does support IPv6?

Torsten

Jul 17 '05 #5
Hello,
Yes I did. It doesn't work with mysql's client but I thought it's
because the client is too old (I tried the mysql-client from the current
debian-stable release which is version 3.23 and really old).

But I don't know if MySQL Server does support IPv6. Does the server need
to explicitly support it, too? That's a good point... If that's the
reason for not working, is there another open source DB out there that
does support IPv6?


If you are using Unix/Linux and the Web server is in the same machine as
the MySQL server, you should not be using TCP/IP at all. Instead you
should use only Unix domain sockets. These are twice as fast as TCP
sockets and obviously more secure as nobody can access your database
from outside your server. In that case you should also start MySQL with
the skip-networking option in your /etc/my.cnf file.
--

Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/

MetaL - XML based meta-programming language
http://www.meta-language.net/
Jul 17 '05 #6
There is actually, it is possible to tunnel IPv6 traffic via IPv4. But
that wouldn't be of any use for my application.

But Daniel was right - it's not PHP, it's mysql that doesn't support
IPv6. I switched to PostgreSQL now and access that DB from PHP's
postgresql-API works via IPv6! Thank you!

Torsten
Jul 17 '05 #7
I mean the other way around, tunnel IPv4 traffic across an IPv6 network.

Uzytkownik "Torsten Schmidt" <gi********@yahoo.co.uk> napisal w wiadomosci
news:bv************@uni-berlin.de...
There is actually, it is possible to tunnel IPv6 traffic via IPv4. But
that wouldn't be of any use for my application.

But Daniel was right - it's not PHP, it's mysql that doesn't support
IPv6. I switched to PostgreSQL now and access that DB from PHP's
postgresql-API works via IPv6! Thank you!

Torsten

Jul 17 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Girish Agarwal | last post by:
--0-474210375-1058976151=:31789 Content-Type: text/plain; charset=us-ascii Content-Id: Content-Disposition: inline Note: forwarded message attached. __________________________________
0
by: Miguel Perez | last post by:
Hi Guys: Does anyone know how come I'm getting a lot of mysql processes when I start mysql server for the first time. When I type top it showed the following: 5:33pm up 15 min, 4 users, ...
4
by: mikey | last post by:
Hi all, I'm having great problems trying to install the latest MySQl RPM package onto my Red Hat Linux OS. There is already MySQL v 3.0 pre-installed with the RH Linux distribution disk but I...
3
by: Mark Adams | last post by:
I am a relative newbie to MySQL. I had a Postfix+Courier+MySQL mail server running for several months. It took me a week or so to get it up and running in September. Now, I did a clean upgrade to...
0
by: Mark Adams | last post by:
I really need some help with this. MySQL will not start on boot despite everything I've done to make sure that it is set to do so. When I start it as root from a terminal with...
2
by: Saqib Ali | last post by:
I installed mySQL and have it running.... but I think I made a mistake somewhere along the line...... I believe I did follow the instructions that were provided with the distribution at:...
1
by: Alex Hunsley | last post by:
I am trying to install the DBD::mysql perl module. However, it claims I need mysql.h: cpan> install DBD::mysql CPAN: Storable loaded ok Going to read /home/alex/.cpan/Metadata Database was...
0
by: ./Rob & | last post by:
Hi gang: I'm experiencing a problem with MySQL -- I updated MySQL from version 4.1.0 to 4.1.10 and now when I login as root it doesn't show all the databases I should have access to, nor it...
2
by: trihanhcie | last post by:
I m currently working on a Unix server with a fedora 3 as an os My current version of mysql is 3.23.58. I'd like to upgrade the version to 5.0.18. After downloading from MYSQL.COM the package on...
1
by: manish deshpande | last post by:
Hi, When i'm installing MySQL-server-standard-5.0.24a-0.rhel3.i386.rpm by the following command: rpm -i MySQL-server-standard-5.0.24a-0.rhel3.i386.rpm the following error is being shown: ...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.