If you are running the phpmyadmin locally with the mysql server, and you
are using the socket, not tcp, as your connection to the db server, then


ps aux | grep mysql

should reveal a 

--socket=/path/to/socket

Then in the phpmyadmin config.inc.php file you would place the
following-

$cfg['Servers'][$i]['host']          = 'localhost'; 
$cfg['Servers'][$i]['port']          = '';          
$cfg['Servers'][$i]['socket']        = '/path/to/socket';          
$cfg['Servers'][$i]['connect_type']  = 'socket';       
$cfg['Servers'][$i]['extension']     = 'mysql';     
$cfg['Servers'][$i]['compress']      = FALSE;       

Keep in mind that if running phpmyadmin in a chrooted apache then it
will perceive the /var/www/ as the root of it's directory structure. In
one of my particular setups, I created '/var/www/var/run/mysql.sock' as
the place the mysql socket is created, and then the socket path (the
'/path/to/socket' shown above) according to phpmyadmin is
'/var/run/mysql.sock'.

Otherwise, if you are using tcp to establish the db connection instead
of the local socket (['connect_type'] = 'tcp';), then in the ['port']
section you would list '3306' (or whatever port you have it running on.)


Then of course you could try telnetting to localhost on 3306 to see if a
connection is established. You should get something similiar this-

# telnet localhost 3306
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
8
5.0.18-log2wxwm;~+X,X35Qv">UpS/1Connection closed by foreign host.

If you don't, then perhaps your local firewall or hosts.allow file isn't
properly configured to allow a connection from localhost itself (just a
guess.)

Hope this helps,

Dan Farrell
Applied Innovations
[EMAIL PROTECTED]
 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of
> Jeroen Massar
> Sent: Tuesday, January 16, 2007 8:23 PM
> To: Der Engel
> Cc: misc@openbsd.org
> Subject: Re: mysql + phpmyadmin
> 
> Der Engel wrote:
> > Hi,
> >
> > Installed mysql+phpmyadmin on OBSD 4.0, when doing
> > http://host/phpMyAdmin/index.php i get the following error:
> >
> > #2002 - The server is not responding (or the local MySQL server's
> > socket is not correctly configured)
> >
> > I can connect remotely just fine using mysql query browser tool,
> > anyone have had this problem? any ideas on how to resolve it?  I
tried
> > #httpd -u but same error.
> 
> When using a socket device, check permissions of the MySQL socket and
> the path leading up to it. When using a network socket, check if you
can
> telnet into it.
> 
> Also note that Apache (you only mentioned httpd) might be in a chroot
or
> running as a different user than what you expect it to be.
> 
> and of course check firewall rules etc.
> 
> Greets,
>  Jeroen
> 
> [demime 1.01d removed an attachment of type application/pgp-signature
> which had a name of signature.asc]

Reply via email to