Solved

error with mysqldump

Posted on 2006-11-15
6
1,966 Views
Last Modified: 2012-05-05
Hi experts,

I am trying to backup my database on my linux box, but I keep getting this error:

mysqldump: Got error: 1045: Access denied for user 'vittoriomysql'@'localhost' (using password: NO) when trying to connect

This is done in a cron job and the command I run is:

mysqldump –opt -Q -u myusername –password=mypassword arp3 > /home/vittorioftp/mysql_backup/EuroDisplay_Arp3_`date +%Y%m%d`.sql

"myusername" is a mysql user that has access to the arp3 database, but it is not a user at linux level.

What could the problem be?

Thanks.
0
Comment
Question by:Vido81
  • 3
  • 3
6 Comments
 
LVL 35

Accepted Solution

by:
Raynard7 earned 500 total points
ID: 17945897
you should not have -password=

-pmypassword

should work

alternativley you may not have permissions on localhost - have you checked this?
0
 
LVL 35

Expert Comment

by:Raynard7
ID: 17945918
Above may or may not solve the problem -
http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html


You can login and use the grant syntax to make sure that myusername has the correct privledges
http://dev.mysql.com/doc/refman/5.0/en/grant.html
0
 

Author Comment

by:Vido81
ID: 17945922
Thank Raynard7,

that was a quick reply.

I think we are getting there... Here is the error I get now:

mysqldump: Got error: 1049: Unknown database '?opt' when selecting the database

I actually don't know what the -opt -Q options do, so I could get rid of them.

I just need to create a full backup of the arp3 table and put it on that folder...

Thanks.

Vittorio
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 35

Expert Comment

by:Raynard7
ID: 17945951
mysqldump -u myusername –pmypassword --tables databaseName.arp3 > /home/vittorioftp/mysql_backup/EuroDisplay_Arp3_`date +%Y%m%d`.sql

hi - above should work - provided you replace the databasename with the name of the databse.
0
 

Author Comment

by:Vido81
ID: 17945960
Raynard7, the name of the database is arp3...
0
 

Author Comment

by:Vido81
ID: 17945971
Thanks, it's now working. I took away the -opt
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
generate a dynamic mysql query 2 41
Filter by data and current_date 4 39
xampp tool 12 25
Mysql sync between 3-4 mysql db 4 25
Introduction In this installment of my SQL tidbits, I will be looking at parsing Extensible Markup Language (XML) directly passed as string parameters to MySQL 5.1.5 or higher. These would be instances where LOAD_FILE (http://dev.mysql.com/doc/refm…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now