Solved

Cron Backup Job - mysqldump

Posted on 2011-03-13
2
760 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 77

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.

785 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