ispCP - Board - Support - VHCS fork

Full Version: MySQL databases
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
I have one question. If we deploy ispCP on webhosting server and if we will have a lot of people with a lot of databases with its names is there any posibility how to make those names unique?
For example:
customer hello.com has mysql database name PEDRO and
customer hiThere.eu want to have database name PEDRO too. Is there a way?

Thanks for reply...
Yes

You can set the configuration to use a prefix for mysql databas names.

so the first user always has 1_PEDRO, the second customer 2_PEDRO

of course the numbr of characters for the database is reduced by the prefix...

/J
can we make the prefix the customer name?
like this:
domain.tld_databasename
Sure - you have the source code.

It's not a built-in option today. Just think about: a MySQL username should not be longer than 16 characters. So if you have a long domain name you're in troubles...

I like the number...
customernumber would be better IMHO
Yes and the same scheme should also work for the MySQL users
- domain name might be too long (punicode...) - mysql usernames are limited to 16 chars
- domain name has a . (dot) which has to be replaced
- it's too long to write.

/J
Reference URL's