Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Cron Backup Job - mysqldump

Posted on 2011-03-13
2
Medium Priority
?
768 Views
Last Modified: 2012-05-11
I have a job scheduled to run daily, but it doesn't look like it's working, I didn't have to enter my password anywhere in here, that maybe the problem.
mysqldump -u root -p forumdb | gzip > /home/domain/public_html/_db_backups/forumbackup.sql.gz

Open in new window

0
Comment
Question by:Nathan Riley
2 Comments
 
LVL 80

Accepted Solution

by:
arnold earned 1000 total points
ID: 35123750
-p password will prompt the user for password the correct switch use with -p is -ppassword you can also use --password="password"
If you run the command:
mysqldump -u root -pforumdb | gzip -c > /home/domain/public_html/_db_backups/forumbackup.sql.gz
or
mysqldump -u root --password="forumdb" | gzip -c > /home/domain/public_html/_db_backups/forumbackup.sql.gz
0
 
LVL 19

Assisted Solution

by:jools
jools earned 1000 total points
ID: 35124053
or mysqldump -u root -prootpassword forumdb | gzip -c >  /home/domain/public_html/_db_backups/forumbackup.sql.gz

there is no space after the -p for the password and you still need to specify the database.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month12 days, 21 hours left to enroll

971 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