But why it is ok when i use system("mysqldump -uroot -p >my_dump_file.sql")? thanks "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > 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 > > [EMAIL PROTECTED] 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. > > > > > > > > > > >
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php