PDA

View Full Version : Changing MySQL DB User Prefix Length


HostingGuy
5th May 2008, 02:40 PM
MySQL DB User Prefix of "<client name>_" is by default truncating the <client name> to 5 characters. In order to get arround it by inserting a new value into misc table.

This will change it to 10 characters.

mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e "replace into misc values('db_user_length',10)"


Since MySQL limits usernames to 16 characters, having 10 characters for the prefix and 1 for the seperator leaves 5 characters for the username.

You may want to change the 10 to something else depending on your user base.