Max DB length is less per underscore

Version 1.58.2


If the mysql.db table has a db column with length 64, the actual max db name length is 63 because the _ character for this column is escaped to \_ where \_ is actually stored in that column. Also, if you allow underscores in your DB names (which we highly discourage), this is included in the size count for each underscore present. (please try and move away from using this option) MySQL seems to allow over-length database names, but the column used to display them is limited, so this needed to be capped to prevent the broken case. The result would be the number of users shows -1 when there are in fact 2 (system account + db_name) =========== JSON CMD_DB? will now include: "MAX_DB_LENGTH": "63", which is directly based on the mysql.db.db table/row size less 1, since all DB names have the _ character, thus \_ You'd need to subtract the username length+1 from this value to know the true length allowed. ------ T19260

Interested to try DirectAdmin? Get a 30-day Free Trial!