Solved

Cron Backup Job - mysqldump

Posted on 2011-03-13
2
758 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:N R
2 Comments
 
LVL 76

Accepted Solution

by:
arnold earned 250 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 250 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
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.

757 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

20 Experts available now in Live!

Get 1:1 Help Now