PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > php.general > mysql_pconnect issue
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
mysql_pconnect issue

Réponse
 
LinkBack Outils de la discussion
Vieux 12/05/2008, 05h16   #1
bruce
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut mysql_pconnect issue

hi...

running into a problem that i can't seem to solve...

using mysql_pconnect() and i'm trying to figure out what parameters have to
be used in order to connect to a local mysql session, where mysql is
accessed using the defaults (ie, no user/passwd/hostIP)

i can connect via the cli, by doing >>mysql, which accesses the db app..

however, for the life of me, i can't figure out what attributes to use to
simply be able to access mysql from within a php app running on apache.

it appears that mysql_connect/pconnect requires an actual user/passwd/hostIP
in order to work.

using mysql_connect("","","") or mysql_connect('""','""','"") returns an
error..

i've looked in the php.ini file and set everything (user/passwd/host) to ""
with no louck..

any pointers would be ful. (i can easily access the mysql if i set up a
user (grant access.....)

but for now, i'm curious as to how to access the default mysql setup...

thanks

peace

  Réponse avec citation
Vieux 12/05/2008, 05h27   #2
Chris
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] mysql_pconnect issue

bruce wrote:
> hi...
>
> running into a problem that i can't seem to solve...
>
> using mysql_pconnect() and i'm trying to figure out what parameters have to
> be used in order to connect to a local mysql session, where mysql is
> accessed using the defaults (ie, no user/passwd/hostIP)


Use 'localhost' for the host, no idea what you'd use for the user/pass,
but mysql requires a username at least. If you're not entering one, it's
using the username you are logged in as.

--
Postgresql & php tutorials
http://www.designmagick.com/
  Réponse avec citation
Vieux 12/05/2008, 05h38   #3
Forcey
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] mysql_pconnect issue

On Mon, May 12, 2008 at 12:27 PM, Chris <dmagick@gmail.com> wrote:
> bruce wrote:
> > hi...
> >
> > running into a problem that i can't seem to solve...
> >
> > using mysql_pconnect() and i'm trying to figure out what parameters have to
> > be used in order to connect to a local mysql session, where mysql is
> > accessed using the defaults (ie, no user/passwd/hostIP)

>
> Use 'localhost' for the host, no idea what you'd use for the user/pass,
> but mysql requires a username at least. If you're not entering one, it's
> using the username you are logged in as.
>

I guess the default user is 'root' and password is empty.

- forcey

> --
> Postgresql & php tutorials
> http://www.designmagick.com/
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

  Réponse avec citation
Vieux 12/05/2008, 08h50   #4
Chetan Rane
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut RE: [PHP] mysql_pconnect issue

Hi

The host name is localhost, username: root, and the password is blank "".
If you have selected the option to allow anonymous login during installation
you can even give the user name and password dboth blank. It will log you in
as an anonymous user.

Chetan Dattaram Rane
Software Engineer


-----Original Message-----
From: Forcey [mailto:forcey@gmail.com]
Sent: Monday, May 12, 2008 10:08 AM
To: Chris
Cc: bruce; php-general@lists.php.net
Subject: Re: [php] mysql_pconnect issue

On Mon, May 12, 2008 at 12:27 PM, Chris <dmagick@gmail.com> wrote:
> bruce wrote:
> > hi...
> >
> > running into a problem that i can't seem to solve...
> >
> > using mysql_pconnect() and i'm trying to figure out what parameters

have to
> > be used in order to connect to a local mysql session, where mysql is
> > accessed using the defaults (ie, no user/passwd/hostIP)

>
> Use 'localhost' for the host, no idea what you'd use for the user/pass,
> but mysql requires a username at least. If you're not entering one, it's
> using the username you are logged in as.
>

I guess the default user is 'root' and password is empty.

- forcey

> --
> Postgresql & php tutorials
> http://www.designmagick.com/
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 11h42.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,11591 seconds with 12 queries