On 12/30/2008 11:57 AM, Manish Sinha wrote:
> lists-mysql wrote:
>> in a *nix environment, restarting the mysql server is done with a
>> system-level command and requires *system* root privileges, not
>> something that the average db-admin is likely to have. also,
>> changing the port a service is listening on has potentially serious
>> implications as you have to understand what (other) services are
>> assigned to, and potentially listening on, which ports, again,
>> generally beyond the knowledge level of the average db-admin.
>>
>> what are you trying to accomplish with this capability? except for a
>> few very limited reasons (e.g., running multiple mysql instances)
>> there really isn't a valid reason to change the port a mysql
>> instance is listening on in the first place.
>>   
> I can understand the point. I have used MySQL for two years and can
> understand mostly all of the options in the config file and its the
> only DB software I have put all my effort into. I have a good and
> sound understanding of MySQL.
> I can understand that management requires root priviliges, so my app
> would run as root itself. I even understand that its not required, but
> this is the only thing which I was unable to achieve via my app since
> I don't want to read and change the my.cnf file itself. Any mistake
> could cost more than expected. Additionally parsing that file to get
> the port no can be problematic since there are two instances of
> port    = 3306
> one of client and other for the server. By mistake I can change the
> wrong one if not taken care of.
> I can understand the security issues but I am actually trying to make
> an app which can administrate MySQL and would later add a GUI over it.
>
If you want to control the server process, you'll need to start the
server process with those options, this mysqld, and the command line
options are here:
http://dev.mysql.com/doc/refman/5.1/en/server-options.html

For your purposes though, I would absolutely parse and use the config
file instead though because operating directly on the server daemon will
likely come into conflict with a lot of distribution specific shell
scripts (/etc/init.d/mysql for example) - and any configuration that is
done will go away on next restart of the server.

The MySQL config file is very standardized and would not be hard to deal
with.

Please don't take this the wrong way, I hate to discourage anyone, but
if you're worried about dealing successfully with the config file, I'd
practice up on my text processing before jumping into server admin
items. I only say this because in the long run I really believe it will
be much easier for you, and a better strategy based on what little I
understand of your goals. Don't know what language you're using, but
there's lots of libs available for perl and python to do this easily.

I hopt this helps.

-Micah

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to