I tried to transfer one table from mydatabase into other server using following code: [root@ns1 /root]# mysqldump -u root -password=asdfghyu mydatabase[test] > /usr/local/test.sql bash: !@#$%: event not found
BUt I always got "bash: !@#$%: event not found".
Anyone has suggestions?
what is mydatabase[test]?
the [ and ] are array operators in bash (I believe).
Do you want mydatabase.test where test is table?
try it. it might do the trick :-)
-sridhar
Yes, [and] are my table. even I didn't attach table like
[root@ns1 /root]$ mysqldump -u root -password=asdfgyu mydatabase | gzip > /html/test/mydatabase.gz bash: !@#$%: event not found
any suggestions?
Hmmm.... i just tried it and it works for me
also, you DO know that it's --password and not -password (two hyphens).
perhaps that caused the problem?
yes, I tried two hypen like
mysqldump --u root --password=xxxx!@& mydatabase |gzip > /html/test/mydatabase.gz
I still got "bash: !@&: event not found"
Our root password has !@&, bash seems not to recognize !@&. I am not sure.
WHat do you think?
Only when it is a whole word do you require 2 hyphens. So the parameter "u" should still have only one hyphen.
-u root --password=abc
Diego
very strange, still not work. Is there problem related to this kind of password "!@&%"?