from the shell, you can use the mysql program 
./mysql -uUser -pPass dbname

from PHP, why dont you just use: mysql_connect(...);

it seems that you might be confused about mysql, trying to
access it "via PHP" from the "unix shell".  if you want to
set a unix shell enviornment variable and access it from 
PHP, you can do this, but i dont know how ;) becuase 
i've never had to do it.

beware of any security risks that this might open you
up for... storing passwords as env. vars

> -----Original Message-----
> From: Jack Sasportas [mailto:[EMAIL PROTECTED]]
> Subject: Re: [PHP] MYSQL Password
> 
> 
> pass the parameter -p and it will ask you for the password....
> 
> Andreas Pucko wrote:
> 
> > Hello,
> >
> > I am trying to get mysql running and connect via php to it.
> >
> > how can I set the password in a unixshell to get access to it?
> >
> > When I try to access the db I get:
> >
> > Warning: MySQL Connection Failed: Access denied for user: 'root@localhost'
> > (Using password: NO) in /psr/mysqladmin/lib.inc.php on line 255
> > Error
> >
> > Andy suggestions?
> >
> > Cheers
> >
> > Andy


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to