473,241 Members | 1,467 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,241 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 5844
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: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.