• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

MySQL Prefix Username issue

Taz-Matt

New Pleskian
Hi,

I have set the MySQL DB Options to add the username prefix to all databases and users but no matter in which domain or for which user I create a database, it always prepends "admin_" instead of "username_".

I have searched the forums but did not find anything related yet. Can anyone help? Did anyone get the same behaviour?

Thanks!
Matt.
 
Hi UFHH01,

Thanks for your reply! I have already done what is in the manual, and it is exactly what is not working. There is not much I can setup. I just tick "Username" where it says "Add prefix and underscore to the beginning of database names" and save the setting. I know it applies the setting as when I create a new database, I now see a prefix, but the prefix is always "admin_", no matter what hosting subscription or domain I am in.

Surely, having the same prefix for all customers would not be useful so that is why I figured there was an issue and was asking for help here. Does that ring any bell for you? Is there anything I can do for this setting to work properly? Has anyone used this setting successfully?

Thanks!
Matt.
 
Hi Taz-Matt,

well, you have here two more options:

"All names of newly created databases will look like <plesk_username>_<database name>"
and
"All names of newly created database users will look like <plesk_username>_<database user name>"

With both options, it doesn't really matter, which additional prefix is used by the customer ( or by you ), because there can't be double entries in your database - server. The already defined prefix "<plesk_username>_<database name>" or "<plesk_username>_<database user name>" will always point to the unique Plesk-username and the second additional prefix will always point to either database_name or database_user_name, no mather if the customer ( or you ), choose another ( hardcoded ) "admin_" prefix or choose to use an additional prefix of your own. Please keep in mind, that "Plesk will add" your pre-defined prefixes, no matter what the customer ( or you ) choose as additional prefix, to avoid non-possible double entries in your database. The hardcoded additional prefix "admin_" is just an offer to remind Plesk-users to choose something usefull in front, to be able to identify the database better - this hardcoded offer is only changeable, if you are able to decrypt the Plesk template for database - creations.
 
Hi again,

Sorry, I could not reply earlier. I have finally found out what was the issue. It seems the prefix is based on the username of the customer, not the username of the subscription. Since I am new to Plesk, I was not aware of this detail. I had created a few subscriptions for my own needs to begin with, that is why they all had the same prefix as they were created with the main "admin" user (not a customer). I have created another customer and a subscription and it gave me a different prefix. So everything is working as expected, as long as you make the difference between the two types of users in Plesk.

Thanks for your help!
Matt.
 
Back
Top