Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've seen many questions about how to run multiple sql servers on one server, but I would like to run mysqld as a user-level process and completely self contained in a folder (I have no permissions outside my user folder).

I spent some time using the --defaults-file=my.cnf, but it still seems to conflict with the system-level mysql server that's running.

Does anybody know how to do this?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

So you want to chroot MySQL - I'd love to say no problem, but that's not the case. It's a moody beast and it doesn't like to be jailed in chroot :P

Chroot instructions will vary between operating systems or even distributions, but here you go:

https://blackdown.de/articles/chrooting-recent-mysql-versions-on-debian-and-ubuntu/

http://www.symantec.com/connect/articles/securing-mysql-step-step

if you need more just search mysql chroot + your distro name

share|improve this answer
    
chroot seems to be a sysadmin command, and I don't have permissions to use it, since I could supposedly use it to gain root access; any other way? I'm trying to do this as a user with no permissions –  codersarepeople Jun 27 '12 at 20:44
    
Use fakechroot instead. –  c2h5oh Jun 27 '12 at 20:48

You should check out http://mysqlsandbox.net/ . I use it for running various sandbox instances on my laptop to test different versions of mysql. It seems to run OK from just my homedir, but I have not tested running a sandbox with another mysqld instance on the same box. Should probably run alright, since it allocates a non-standard port but you should be careful.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.