Bug #17962 | instance manager can modify options only if started by root | ||
---|---|---|---|
Submitted: | 6 Mar 2006 13:05 | Modified: | 4 Apr 2006 14:05 |
Reporter: | Giuseppe Maxia | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.0.18, 5.1.7 | OS: | Linux (Linux) |
Assigned to: | CPU Architecture: | Any |
[6 Mar 2006 13:05]
Giuseppe Maxia
[6 Mar 2006 13:21]
Hartmut Holzgraefe
Check the permissions of your my.cnf file, it needs to be writeable by the user the instance manager runs as. So either change the owner of the file to this user or change the file permissions so that the user has write access to it. Running as root obviously solves the permission problems, too, but is not recommended. And threre is nothing we can do about it, permissions are managed by the operating system, not the application.
[6 Mar 2006 13:44]
Giuseppe Maxia
I know that changing the permissions will avoid the problem. The whole point of my report is that the instance manager does not have the same flexibility that is offered by mysqld_safe, meaning that it needs a root intervention to be used (editing /etc/init.d/mysql or changing permissions to /etc/my.cnf) while mysqld_safe can be used easily without root privileges. To be honest, by editing the startup script you can overcome the problem, but it is a task for experts only, not something I can recommend a junior administrator to do. The instance manager needs some more attention become really useful. I shouldn't have to give up some existing features to get the new ones. At least, the instance manager should do the same as mysqld_safe. In this specific case, allowing the instance manager to use a configuration file in the basedir would be a welcome addition.
[4 Apr 2006 10:42]
Petr Chardin
Guseppe, current installation routines do touch /etc/my.cnf. That's why one has to chmod the file manually (usually, giving +rw access to the "mysql" user on the file). Do you think that altering RPM install routines, so that they check that the file exists and belongs to "mysql" user will help?
[4 Apr 2006 14:05]
Giuseppe Maxia
The problem is not in the RPM behavior. Actually, since I install in several Linux flavors, I almost never bother with RPMs, and I go straight to the binary package. Since I need often to install a server without having root privileges (due to my customers policies), I need to be able to set up the server independently from whichever setup lays in /etc/my.cnf. For mysqld_safe, there is no problem, because settings can be overriden by using a configuration file in the data directory (or, for 5.x, in the base directory). I believe that the instance manager should offer the same flexibility, which would also solve the problem of options modification. Giuseppe