View Single Post
  #7  
Old 2nd August 2010, 14:39
fatbear fatbear is offline
Member
 
Join Date: Jul 2010
Location: Raleigh, NC US
Posts: 41
Thanks: 4
Thanked 8 Times in 4 Posts
Default

On the matter of Unix user names and group names and MySQL usernames:

Using the Unix GID as the MySQL username (and keeping the passwords of the client and the MySQL user sync'd) is my preference for ease of administration. I prefer highly mnemonic user and group names because:

1. It helps me to spot errors as I look at files in the Unix filesystem.

2. Such names are easier for customers (and me) to remember.

3. It appeals to customer's vanity (the acme customer would much rather see and use "acme" instead of "client23" when logging in, ftp'ing files, etc.)

To address your concerns:

1. Note that my preference is to have the Unix GID be the MySQL username for an account. This implies that the GID should be restricted to a certain number of characters less than 16. It all depends on how much variability one would want for MySQL usernames that have a GID prefix. This can be a settable parameter. But, let's say, by default, the GID length is 10. That would still leave 6 characters for MySQL "sub" users.

2. The UID is used for other Unix services (such as mail, web, and ftp), but not for MySQL.

Again, is there any reason to not allow a user of ISPConfig to not choose this approach if they want to? It does satisfy all technical requirements. Again, it may be reasonable for ISPConfig to try to influence the user's behavior. But, if the system administrator prefers to adopt naming such as I've described above, I say the control panel should let them.

Lastly, regarding the "_" issue for the database name.... It is useful to be able to just look at the database name and know which MySQL user it belongs to. In the example I previously gave (with users abc and abcdef and the database name abcdefghi), you can't tell which user owns the database named abcdefghi by simple inspection of the database name. Some character, not permitted as part of the database name prefix (the MySQL user name), would guarantee the ability to identify the database name's user by simple inspection. Note that the "_" is not special as is indicated in Section 8.2 Schema Object Names of the MySQL documentation. It is only when the underscore is used for searching that problems arise. But, that being said, I do agree that it might be best to avoid needing to escape underscores when doing searching. So, we could use other character that is not going to be allowed as a GID. I think the period (".") or the hyphen ("-") might be better choices based on your concern.

Again, this comes down to: can this be a feature, or will this require hacking of the codebase. Obviously, I prefer this to be a feature.
__________________
Steve Amerige, Fat Bear Incorporated
Server Leasing | Web Software Development | User Experience & Graphic Design
Managed Services, Website, Java, and Source-Code Hosting
Did my post help you? Click the Thanks button!
Reply With Quote