473,473 Members | 1,581 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

2 MySQL : How does PHP can use the good socket ?

Hi,

I've 2 instances of apache 1.3.27 with php 4.2.3 and mysql 3.23.42 running
on the same server.

The 1st apache listens the port number 80 and communicates with the 1st
mysql with the socket /var/mysql/mysql1.sock (i've also defined the port
3306)

The 2nd apache listens the port number 8080 and communicates with the 2nd
mysql with the socket /var/mysql/mysql2.sock (i've also defined the port
3366)

I've only one "bin" of apache (then of couse one php.ini). So, I start the 2
instances of apache with 2 apachectl (apachectl1 and apachectl2) linked to 2
httpd.conf (httpd1.conf and httpd2.conf)

in httpd1.conf, I use :

<IfModule mod_php4.c>

php_admin_value mysql.default_socket /var/mysql/mysql1.sock

php_admin_value mysql.default_host 127.0.0.1

php_admin_value mysql.default_port 3306

</IfModule>

in httpd2.conf, I use :

<IfModule mod_php4.c>

php_admin_value mysql.default_socket /var/mysql/mysql2.sock

php_admin_value mysql.default_host 127.0.0.1

php_admin_value mysql.default_port 3366

</IfModule>

when I'm connecting, on each apache, a mysql_connect with "IP and user and
password (without mysql's port)" : The connexion is succeded and the good
mysql is well reached !

when I'm connecting, on each apache, a mysql_connect with "127.0.0.1 and
user and password (without mysql's port)" : The connexion is succeded, the
good mysql is well reached !

BUT :

when I'm connecting, on each apache, a mysql_connect with "localhost and
user and password (without mysql's port)" : The connexion is failed !

when I'm connecting, on each apache, a mysql_connect with "user and password
(without mysql's host and port)" : The connexion is failed !

I think in the 2 last cases, it's a problen of socket. When I run the "php
info" : mysql.default_socket is set with the good value !

Does anyone have a solution for the 2 last cases ?
Jul 16 '05 #1
0 2163

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

Similar topics

0
by: Dennis Francis B. Tutanes | last post by:
$B$*@$OC$K$J$C$F$*$j$^$9!#(B $B%D%?%M%9(B@TSTI$B$G$9!#(B SEND-PR: -*- send-pr -*- SEND-PR: Lines starting with `SEND-PR' will be removed automatically, as SEND-PR: will all comments (text...
0
by: I.P. | last post by:
Hi, it's my story. I have two 4.0.14 mysql server on one machine with win XP Professional polish version. First acts as master: on port 3300 Second acts as slave: on port 3301 below my...
0
by: I.P. | last post by:
No one has replied to my post. ----- Original Message ----- From: "I.P." <jancio_wodnik@wp.pl> To: <mysql@lists.mysql.com> Sent: Monday, August 18, 2003 1:01 PM Subject: mysql 4.0.14 +...
0
by: Mike Chirico | last post by:
Interesting Things to Know about MySQL Mike Chirico (mchirico@users.sourceforge.net) Copyright (GPU Free Documentation License) 2004 Last Updated: Mon Jun 7 10:37:28 EDT 2004 The latest...
9
by: Sheldon | last post by:
Hi, I have a mysql setting problem that is driving me mad. Hopefully someone can give some advice: On the local network I have windows 2000/iis5 machine running our intranet site, with php...
3
by: Kirk Soodhalter | last post by:
Hi, This started as a phpmyadmin problem, but has somehow morphed into a mysql problem. I don't know how to fix it. I am posting the conversation from a php newsgroup since it started there. ...
3
by: James Griffiths | last post by:
System Info: RedHat Linux 9 (text only) Mysql 3 When I execute mysql from the command line I receive an error: "error 2002: Mysql cannot connect to socket /var/lib/mysql.sock" (or...
1
by: jlee | last post by:
I'm pretty much a newbie on mysql, and I need some help. I am running mysql Ver 12.22 Distrib 4.0.24, for portbld-freebsd5.4 (i386) on a server hosting an active website. The site's developer...
4
by: Richard | last post by:
Hi All, I've been trying to build a Ruby-on-Rails plus MySQL application. I'm running Ruby 1.8.2, Rails 1.1.4 and MySQL 5.0.15-nt over WinXP-Pro/SP2. I run under an Administrative account. ...
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.