--On Wednesday, June 30, 2004 07:36:23 PM -0500 Paul DuBois <[EMAIL PROTECTED]> wrote:
At 13:58 -0700 6/30/04, Bill MacAllister wrote:Hello,
I am a bit confused by processing of user= specifications in the mysqld_safe script. Here is what I see:
* If user= is specificed in the [mysqld] or [server] sections then it is ignored and a flag is set that prevents the specification of a user in any subsequent options parsing.
* Otherwise the user will be extracted and used from either the [mysqld_safe], [safe_mysqld], or command line arguements.
Not quite. For security reasons, only the *first* encountered instance of the user option is used, and any others are ignored.
http://dev.mysql.com/doc/mysql/en/Server_options.html
See the descripion of --user in the option list.
Thanks for the pointer to the documentation. I just missed it.
But, my reading of the code in mysqld_safe (4.1.2) does not match the documentation. The first pass through the option sections [mysqld] and [server] have the SET_USER script variable set to 2. With this value set any user specification is ignored, but specifying a user disables any subsequent user specifications because SET_USER is set to 1.
Also, I don't see any where that would generate warnings if there are multiple user specifications. It took me quite a while to figure out why my mysqld_safe was trying to run the mysql server as mysql instead of the user that I specified. Still looks like a bug to me.
Bill
This is counter intuitive if nothing else, and I really don't see why user should be parsed any differently than any other options. Am I missing something or is this a bug?
It's by intent.
-- Paul DuBois, MySQL Documentation Team Madison, Wisconsin, USA MySQL AB, www.mysql.com
+--------------------------------------------------- | Bill MacAllister | 14219 Auburn Road | Grass Valley, CA 95949 | 530-272-8555
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]