Web Hosting Talk







View Full Version : HELP!!!Appear error when I backup my SQL


randytsa
09-03-2003, 09:39 PM
When I backup my sql using SSH

I typed in SSH

>>mysqldump --opt MyDatabaseName > BackUpFile.sql

but appear this message

>>Got error: 1045: Access denied for user: 'yhtsai@localhost' (Using password: NO) when trying to connect

I have inserted the username and password when I login to the SSH
so I don't know waht is the (Using password: NO) mean?

or did I do anything wrong?

UH-Matt
09-03-2003, 09:51 PM
You need to login to MySQL with your mysql details, logging into SSH doesnt count towards the mysql login.

use this command:

mysqldump -u USERNAME -p --opt DATABASENAME > dumpfile.sql

Insert your username and database name. It will prompt you for your password.

randytsa
09-03-2003, 10:09 PM
Just like you said, I insert the comand
>>
bash-2.05a$ mysqldump -u yhtsai -p -a yhtsai_forum > 2003.9.4.sql
Enter password:
bash-2.05a$
>>
the error message doesn't come out,
but it go back to the command line and nothing happened

UH-Matt
09-03-2003, 10:10 PM
The file 2003.9.4.sql probably exists tho ?

which means you have successfully backed up the db. Nothing else should happen.

randytsa
09-03-2003, 10:24 PM
I discover something:

my original backup file(2003.9.4.sql) size is changed(just remain 20.00kb)

In order to test this command, I try to back up a file is not exists

>>bash-2.05a$ mysqldump -u yhtsai -p -a yhtsai_forum > nothis file.sql

the result is same with the right one
(bash-2.05a$ mysqldump -u yhtsai -p -a yhtsai_forum > 2003.9.4.sql

just go back to command line and nothing happehed

then I check the server. Ther is a new file call (nothisfile.sql) just created

so that is mean the command create a new file
WHY??????????????????help!!!!!!

YUPAPA
09-04-2003, 02:00 PM
Just type man mysqldump and look at the syntax :penguin: