#1  
Old 13th January 2009, 07:25
pat pat is offline
Junior Member
 
Join Date: Jan 2009
Posts: 9
Thanks: 2
Thanked 3 Times in 2 Posts
 
Default New DB naming scheme

I would prefer if databases and database users where named after the owning domain rather than arbitrary IDs if possible. I did a small hack (patch link below) and haven't had any problems in my basic tests. However, it would be great if someone that is actually familiar with the ISPConfig code base could take a look at it. There might also be some additional characters valid in domain names that need replacement in either database names or user names (point 4 below). I have also kept backward compatibility with the current naming scheme (I actually even use it as a fallback when domain names get to long).

The new naming scheme is as follows:

1) First customer database name = domain name (example.tld)

2) Additional customer databases = domain name + underscore and number (example.tld_2, example_tld3, etc)

3) If a database user name created using rule 1 or 2 above would exceed the 16 character length restriction in MySQL, the old naming scheme using internal IDs are used.

4) Dots are replaced with underscores in database user names since dots are invalid characters in MySQL user names.


Patch against 2.2.29 is attached.


Cheers,
Pat
Attached Files
File Type: zip ispconfig_isp_datenbank.lib.php.zip (788 Bytes, 234 views)
Reply With Quote
The Following User Says Thank You to pat For This Useful Post:
falko (14th January 2009)
Sponsored Links
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
iSCSI naming conventions for test environment geppetto HOWTO-Related Questions 0 30th July 2008 21:06
Change Database username/databasename scheme ? wuptydu Installation/Configuration 1 29th February 2008 12:01
Database naming in ISPConfig 2.2.21 different from previous versions rsun Installation/Configuration 1 18th February 2008 18:34
Site Naming tcroteau Installation/Configuration 2 11th September 2007 13:56
Naming the mail server lrider Feature Requests 0 2nd March 2007 23:18


All times are GMT +2. The time now is 13:44.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.