LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-03-2008, 01:46 PM   #1
timgerr
LQ Newbie
 
Registered: Feb 2004
Location: Michigan
Distribution: Debian
Posts: 27

Rep: Reputation: 15
Create mysql user for backup of database


Hey all,
I have a backup script that I created and I now want to backup my mysql database. I need to use the mysqldump. Since the username and password will be in a script I need to create a user that can only dump the database. What permissions does this user need? I only want to give what is needed.

Thanks,
timgerr
 
Old 01-03-2008, 05:49 PM   #2
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197

Rep: Reputation: 105Reputation: 105
The folks at Zmanda have worked out the details for that and have recommendations in the link below. If you want to, you can just adopt Zmanda Recovery Manager for MySQL. It's open source, and it will handle all the backups for you. Their recommendations for a MySQL backup user are here:

http://mysqlbackup.zmanda.com/index....QL_Backup_User

That's part of the user's manual that starts here:

http://mysqlbackup.zmanda.com/index....L_Users_Manual

And the download page is here:

http://www.zmanda.com/download-zrm.php
 
Old 01-04-2008, 10:44 AM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by timgerr View Post
Hey all,
I have a backup script that I created and I now want to backup my mysql database. I need to use the mysqldump. Since the username and password will be in a script I need to create a user that can only dump the database. What permissions does this user need? I only want to give what is needed.

Thanks,
timgerr
Also since you'll have a username and password in the script, make sure the permissions for the script itself are only readable by the user that will be running the command, I'm assuming root in it's own crontab, etc. This way no other user can gain access to your database with the said username by simply viewing the script unless they have root or whatever user running it access.
 
  


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
Backup software for MySql database blinton25 Linux - Software 5 06-01-2007 03:40 AM
How to import a mysql database from backup WindowBreaker Slackware 6 03-16-2006 11:08 PM
How to create Database in mysql irfanhab Linux - General 1 12-16-2004 06:37 PM
MySQL - command - create user/single database dmedici Linux - Software 3 06-21-2004 03:17 PM
query DNS and create mysql database nabil Programming 0 01-18-2002 04:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:03 AM.

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