RE: [PHP] MYSQL Password

From: Date: Fri, 18 May 2001 15:56:55 +0000
Subject: RE: [PHP] MYSQL Password
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-53442@lists.php.net to get a copy of this message
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:jack@innovativeinternet.com] > 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

« previous php.general (#53442) next »