Backup MySQL and it's password

Discuss Applications
Post Reply
User avatar
Basher52
guru
guru
Posts: 912
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Backup MySQL and it's password

Post by Basher52 » Wed Dec 14, 2011 12:53 pm

I've created cron jobs for this and it sure works, but now I've heard it's better to move the password in that file to another file and instead of wring the password in the cron script point to this separate file.
Why is that more secure?
They say, you can make that file non readable to non root users.
I say, so... I can do that with the cron script file too.

I don't get it? What's the difference?

User avatar
Void Main
Site Admin
Site Admin
Posts: 5712
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Re: Backup MySQL and it's password

Post by Void Main » Wed Dec 14, 2011 6:23 pm

It's generally not a good idea to pass a password as a parameter as it will show up in a process list (ps). Reading it from a file solves that problem.

User avatar
Basher52
guru
guru
Posts: 912
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Re: Backup MySQL and it's password

Post by Basher52 » Thu Dec 22, 2011 3:15 pm

Oh, didn't think of that :(
I just tried to see if a "normal" user could use 'ps' and they can which I think is weird cos why does a normal user needs to do that!!!(?)
Maybe see his OWN processes yes but everything... that's weird as I think.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5712
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Re: Backup MySQL and it's password

Post by Void Main » Sat Dec 24, 2011 6:44 pm

That's the way it's been from the beginning of time (UNIX time that is). :)

Post Reply