Re: [PHP] system(): access denied

2003-01-16 Thread Chris Boget
> > system("mysql -uroot -p < the_dump_file.sql") > > it doesn't know where the command ends and the input > > begins. So what's going on is that the command thinks > > that the password is coming from the "the_dump_file.sql". > It knows exactly where the command ends and the input > begins. It is

Re: [PHP] system(): access denied

2003-01-16 Thread Chris Shiflett
--- Chris Boget <[EMAIL PROTECTED]> wrote: > system("mysql -uroot -p < the_dump_file.sql") > > it doesn't know where the command ends and the input > begins. So what's going on is that the command thinks > that the password is coming from the "the_dump_file.sql". It knows exactly where the comma

Re: [PHP] system(): access denied

2003-01-16 Thread Adam Voigt
This is infact not the case, using the < operator does not make the mysqldump program read that file and interpret the data in the file as the password, if you have a proper password set and use the -p option (even with a < operator) it will still ask you for a password. On Thu, 2003-01-1

Re: [PHP] system(): access denied

2003-01-16 Thread Chris Shiflett
--- [EMAIL PROTECTED] wrote: > no, i use mysqldump -uroot -p > my_dump_file.sql > it is not '<' but '>' That syntax is fine, and it should prompt you for a password. My suggestion is to give the root account a password and don't worry about all of this. I think I read that it is currently empty,

Re: [PHP] system(): access denied

2003-01-16 Thread Chris Boget
> But why it is ok when i use system("mysqldump -uroot -p >my_dump_file.sql")? As alluded to by the last user (who got the command wrong), when you do: system("mysql -uroot -p < the_dump_file.sql") it doesn't know where the command ends and the input begins. So what's going on is that the comm

Re: [PHP] system(): access denied

2003-01-16 Thread lastnumberone
no, i use mysqldump -uroot -p > my_dump_file.sql it is not '<' but '>' "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I suppose because if you use > > mysqldump -uroot -p > the password is read from my_dump_file.sql > > [EMAIL PROTECTED] wr

Re: [PHP] system(): access denied

2003-01-16 Thread Marek Kilimajer
I suppose because if you use mysqldump -uroot -p 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 speci

Re: [PHP] system(): access denied

2003-01-16 Thread lastnumberone
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 gi

Re: [PHP] system(): access denied

2003-01-16 Thread Marek Kilimajer
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 r

[PHP] system(): access denied

2003-01-16 Thread lastnumberone
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