11.28 Backwards Incompatible Change - Technical Advisory

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
Edited to reflect Version Number Designation Changes July 29, 2010

With version 11.28, cPanel introduces the Database Mapping feature. This feature lays the groundwork for providing more flexibility in naming databases and database users.

In the past, cPanel has always appended an account's username to any database name or database username created by the account (for example, a database might be named "user_dbname"). This changes with the addition of the Database Mapping feature.

In cPanel 11.28, Database Mapping provides the following benefits:

1. Accounts transferred from non-cPanel servers, such as those running Plesk or Ensim, will no longer have the cPanel account name added as a prefix to the names of databases and database users. This means applications like blogs and forums should work with minimal (or no) changes after transfer.

2. Server owners can disable use of the database name prefix server-wide. If a server owner chooses this option, databases and database users will no longer be created with the cPanel account as a prefix (for example, a database could be named "dbase" instead of "user_dbase"). This option is not reversible.

Both the above features will make a server incompatible with older versions of cPanel. If either 1) a non-cPanel account is transferred to an 11.28 server, or 2) the server owner opts to disable prefixing, then that server will not be able to later downgrade to 11.25.0.

Likewise, transferring an account from a cPanel system that does not use the database prefix to one that does (e.g., cPanel 11.28 with prefixing disabled, to cPanel 11.25.0) will result in support issues. Databases and database users whose names lack the prefix will not be manageable in the cPanel interface.

Further information about Database Mapping will be published in the coming weeks.
 
Last edited by a moderator:

Spiral

BANNED
Jun 24, 2005
2,018
8
193
If you are going to start allowing for non-prefixed names, how do you plan to get around to problem of name conflicts?

(IE: multiple accounts having the same database / logins)
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
If you are going to start allowing for non-prefixed names, how do you plan to get around to problem of name conflicts?

(IE: multiple accounts having the same database / logins)
As mentioned in yesterday's webinar (recording available at Webinars - cPanel Inc.), if a database name or username is in use, then no one else can create a database with that name/username. An error is generated and the user must select a new name/username.
 

yapluka

Well-Known Member
Dec 24, 2003
301
2
168
France
cPanel Access Level
Root Administrator
2. Server owners can disable use of the database name prefix server-wide. If a server owner chooses this option, databases and database users will no longer be created with the cPanel account as a prefix (for example, a database could be named "dbase" instead of "user_dbase"). This option is not reversible.
Existing db and dbusers created earlier with the prefix wouldn't change, right ?

Also, would the users still be able to create their db and dbusers with a prefix if they want to ? ie : would the character "_" be accepted ?

Thank you :)
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
Existing db and dbusers created earlier with the prefix wouldn't change, right ?

Also, would the users still be able to create their db and dbusers with a prefix if they want to ? ie : would the character "_" be accepted ?

Thank you :)
As discussed at yesterday's webinar (recording available at Webinars - cPanel Inc.), this will not influence existing database usernames nor existing database names. After you choose to drop prefixing support, users can use any database name and database username they want (within the capabilities of MySQL), including user_dbname.
 

alinford

Well-Known Member
Nov 4, 2006
62
10
158
I like prefixes on db's from a support standpoint, so would like to leave that option on, but I also need to move accounts over from non cPanel servers.

When db's are moved from non cPanel servers, they will come in without prefixes. Will I need to update those db's, or will those db's work, but force newly created db's in the account to have prefixes?
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
I like prefixes on db's from a support standpoint, so would like to leave that option on, but I also need to move accounts over from non cPanel servers.

When db's are moved from non cPanel servers, they will come in without prefixes. Will I need to update those db's, or will those db's work, but force newly created db's in the account to have prefixes?
Databases from non-cPanel servers will always maintain their names, even when prefixing is enabled.

Even when you have not opted in to allowing your users to create databases without prefixes, when you import accounts from non-cPanel servers, their databases will come in without prefixes and still be accessible to those customers (respectively). This helps make the migration process to cPanel easier for your migrated customers. However, any new database they create would still require the prefixing since the prefixing requirement for new databases is governed by the tweak setting.
 

n8whnp

Member
Sep 2, 2007
13
0
51
DavidN,

I am really sad to see how this feature was implemented. It strikes me that cPanel could have spent a bit more time and made the db-mapping infrastructure much more useful. I hope that as the work continues you will refine these functions.

The current design solves one issue: Importing customers from other controls panels to cPanel without changing their configuration. However you missed solving a much more frequent and vexing issue for us, which is splitting one cpanel user account with 100 addon domains into 100 different cpanel accounts.

We deal with customers all the time who have added lots of addon domains to a single cpanel account and then are hitting process limits or other account restrictions and want to split their single cpanel account into multiple accounts.

Most of the parts of the hosting account are clear about which domain they are linked to. For example I can process the email_accounts.yaml and get a list of email accounts just for that domain, if I wanted the public_html yaml, can do that as well. The central problem I have is finding out which databases are linked to what domains. What I need is a sophisticated database mapping system.

If you are going to break backwards compatibility, why not go all the way and give us a db-mapping system that covers db-> domains as well as db-> cpanel username.

And before you recommend some script that trawls the account, find references to databases and makes these links dynamically - if it were easy to trawl accounts and change db_usernames / db_names you would have written that import code instead of breaking compatibility for all of your users, right?

Nate
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator

Dan_EZPZ

Member
May 8, 2008
18
0
51
How would this work if a cPanel account is moved from a host that does allow DBs without the username to a host that hasn't enabled this feature?

Would the username be added to the database when the account is restored?
 

victomeyezr

Well-Known Member
Sep 25, 2008
54
0
56
If we upgrade an existing server, then set toe db usernames to disable the prefix, what will that do to exsiting db's and cpanel accounts?
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
If we upgrade an existing server, then set toe db usernames to disable the prefix, what will that do to exsiting db's and cpanel accounts?
It will not affect existing databases (including not affecting their database names of username_dbname). However, disabling the prefix will allow all cPanel accounts to create databases without that username_ prefix.
 

rgpayne

Well-Known Member
Feb 25, 2003
72
0
156
Texas
It will not affect existing databases (including not affecting their database names of username_dbname). However, disabling the prefix will allow all cPanel accounts to create databases without that username_ prefix.
I think you are wrong David

We did the exact thing above and it screw the server box
fantasico will not install and database related script ( ie. word press )
It has been a night mare
 

cPanelDavidN

Well-Known Member
Staff member
Dec 17, 2009
571
3
68
Houston, TX
cPanel Access Level
Root Administrator
Hi rgpayne,

That's unfortunate to hear. However, DavidG is correct in his statement. The databases that were created before prefixing was disable are still accessible through the cPanel UI and APIs. Their names or privileges haven't changed within MySQL.

Fantastico is not maintained by cPanel. If the developers of Fantastico chooses to not utilize our APIs or do continuous development against our features (in early release builds, like the BETA and EDGE release tiers), there isn't much we can do about that.

Have you read the DB Mapping white paper? Did you opened a support ticket? I don't know how long your server has been in the prefixing disabled state, but if you ask for specific help we will try to accommodate your request, whether it's hear in the forums or through our Technical Support.

Regards,
-DavidN
 

melisa12345

Registered
Aug 17, 2011
3
0
51
the users still be able to create their db and dbusers with a prefix if they want to..?
i.e : would the character "_" be accepted ?

:confused: