Solved

How to protect DB file of mysql DB

Posted on 2011-03-23
9
354 Views
Last Modified: 2012-05-11
I want to protect mysql DB

Because, any one have root access of OS can reset root password of mysqldb, and have fullright accesss to all DBs

Is there any way to protect this?

Thank you!
0
Comment
Question by:redstar01
  • 4
  • 4
9 Comments
 
LVL 1

Accepted Solution

by:
greenbug2002 earned 100 total points
ID: 35197025
not really if you have physical access to the box bottom line if your sufficiently skilled you can get the data on it best way is an independent VMware solution with you controlling the physical hardware and all the non-trusted users on there own VMware image then put the server in a physically secure place
0
 
LVL 33

Assisted Solution

by:Dave Howe
Dave Howe earned 200 total points
ID: 35197479
Normally, no. Root access of a *nix server is absolute; you shouldn't give root access to anyone you can't trust.

More modern *nix operating systems have a system of either ACL or FACLs that can give this effect, although with enough work the root user can get around it (and you must remember that the root user can *always* use su to assume the identity of another user without knowing their password) but to be honest its not much more than a speed bump.

what would really be needed is some sort of userspace encrypted file system that uses a redirection library to encrypt the data - now, mysql could probably support something like that (after all, the backend code is available) but it means compiling your own executables or finding something that substitutes for file read/write calls with its own code (and some way of supplying the password at startup)
0
 
LVL 6

Assisted Solution

by:Ferrosti
Ferrosti earned 200 total points
ID: 35199195
Make sure root@localhost is not allowed to access mysql, especially without password.
This prevents root to read (select) data from your db. Though root would still be able to copy mysqls  data files somewhere and setup an own mysql server with respective permissions and read these files there.
0
 
LVL 33

Assisted Solution

by:Dave Howe
Dave Howe earned 200 total points
ID: 35199708
Ferrosti: unfortunately, as the querient says, the root can just stop the service, restart it with auth disabled, and set up a superuser account of his choice on there.
0
Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

 
LVL 6

Assisted Solution

by:Ferrosti
Ferrosti earned 200 total points
ID: 35200125
@DaveHowe:
This is for sure. But this system seems quite important, so a stop, change, etc. would most likely be seen immediately.
0
 
LVL 33

Expert Comment

by:Dave Howe
ID: 35200600
@Ferrosti: depends I guess. if you script it, and it would be over and done with in under three seconds (I just checked :)

one thing that does appear possible is if the files aren't local, but on a kerberos-secured NFS share - however, I suspect the performance hit there would be significant, and reboots (with logging back in to restart the session at the command line so you can supply the kinit credentials) would be a nightmare.
0
 
LVL 6

Expert Comment

by:Ferrosti
ID: 35200630
@DaveHowe
I think we are talking about the same when when you agree to: If 'root' aint trustworthy you d have a bunch more problems than your DB only.
0
 
LVL 33

Expert Comment

by:Dave Howe
ID: 35202338
Yup. you can do encrypted volumes to stop people bypassing the auth and booting from a cd or something, but if someone you don't trust has root on your box, you are toast.
0
 
LVL 6

Expert Comment

by:Ferrosti
ID: 35207720
Encrypted volumes would prevent root from rebooting (mount is needed after boot) as well as certain kinds of backup. I won´t go for that.
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.

Join & Write a Comment

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
​Being a Managed Services Provider (MSP) has presented you  with challenges in the past— and by meeting those challenges you’ve reaped the rewards of success.  In 2014, challenges and rewards remain; but as the Internet and business environment evol…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

746 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

12 Experts available now in Live!

Get 1:1 Help Now