LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-05-2006, 09:15 AM   #1
pshankland
Member
 
Registered: Feb 2006
Location: UK
Distribution: CentOS 5.5
Posts: 46

Rep: Reputation: 15
Problem with scripting 'mysqldump'


I have the following small bit of script:

Code:
mysqldump -u root -p=password cacti > $MYSQL_FILE
But, whenever this runs I get the following error:

Code:
mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect
Any suggestions?

Thanks.
 
Old 04-05-2006, 09:17 AM   #2
pshankland
Member
 
Registered: Feb 2006
Location: UK
Distribution: CentOS 5.5
Posts: 46

Original Poster
Rep: Reputation: 15
Running this bit of the script manually from the command line I also get the same error but when I omit the '=password' bit, I get prompted for the root password and the backup works?
 
Old 04-05-2006, 01:38 PM   #3
madluther
Member
 
Registered: Aug 2004
Distribution: LFS
Posts: 350

Rep: Reputation: 31
Remove the "=" sign from your script ....

Code:
mysqldump -u root -ppassword cacti > $MYSQL_FILE
HTH

Mad
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mysqldump questions wh33t Programming 1 10-24-2005 09:07 PM
about mysqldump javier_ccs Programming 3 08-08-2005 07:13 PM
restore using mysqldump sporkit Linux - Networking 2 05-26-2004 06:34 PM
mysqldump - backup *.* bpk Linux - Newbie 1 03-29-2004 05:42 PM
MySQLDump and Cron duerra Linux - Newbie 6 02-20-2004 09:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration