Re: system(): access denied

From: Date: Thu, 16 Jan 2003 15:23:43 +0000
Subject: Re: system(): access denied
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-131871@lists.php.net to get a copy of this message
no, i use mysqldump -uroot -p > my_dump_file.sql it is not '<' but '>' "Marek Kilimajer" <kilimajer@webglobe.sk> wrote in message news:3E26CDFC.1070805@webglobe.sk... > I suppose because if you use > > mysqldump -uroot -p <my_dump_file.sql > > the password is read from my_dump_file.sql > > lastnumberone@msn.com wrote: > > >But why it is ok when i use system("mysqldump -uroot -p >my_dump_file.sql")? > >thanks > >"Marek Kilimajer" <kilimajer@webglobe.sk> wrote in message > >news:3E26C62D.8070600@webglobe.sk... > > > > > >>There is nothing wrong with it, with the -p switch, you specify you want > >>to supply a password, but you don't give any, hence access denied > >> > >>lastnumberone@msn.com wrote: > >> > >> > >> > >>>Hello All, I have a script which uploads a mysqldump file into the server > >>>and use system("mysql -uroot -p < the_dump_file.sql") to restore the > >>>database. While, it does not go through and the apache error_log shows: > >>> > >>>Enter password: Enter password: ERROR 1045: Access denied for user: > >>>'root@localhost' (Using password: YES) > >>> > >>>The passwords for mysql account "root" is "", but when I remove > >>>the -p > >>> > >>> > >from > > > > > >>>the command, everything is fine. > >>> > >>>The wired thing is, when I use system("mysqldump -uroot -p > >>> > >>> > >>> > >>> > >>>>the_dump_file.sql"), it is also fine. > >>>> > >>>> > >>>> > >>>> > >>>Anybody has experience of this? or any suggestions? Thanks a lot. > >>> > >>> > >>> > >>> > >>> > >>> > >>> > > > > > > > > > > >

« previous php.general (#131871) next »