Per-User mysql.conf files

Version 1.49

Feature
Finished

Previously, there could only be 1 database server, as specified in: /usr/local/directadmin/conf/mysql.conf This feature allows you to specify some other mysql.conf file, on a per-User basis, so some can be on DB server A, and others on B, or as many as you want to specify (only one server per User though) To use this feature, you must first turn it on by adding: custom_mysql_conf=1 to your directadmin.conf, and restarting directadmin. The internal default is 0. Once enabled, the database class in DA will then read in the user.conf for the given User. To override the default mysql.conf, you'd simply add: mysql_conf=/usr/local/directadmin/conf/othermysql.conf in the: /usr/local/directadmin/data/users/username/user.conf for that account, and DA will start using it for everything, in place of the mysql.conf. The path you set can be anything, but the read of the file only has "diradmin" access, so for simplicity, you might want to keep it in the same path, same permissions, like the mysql.conf. The "othermysql.conf" has 100% the same functionality as the mysql.conf, so you can specify different mysql.sock files, or different host or access_host values. Also, because mysqldump and mysql restores make use of: /usr/local/directadmin/conf/my.cnf any action that typically rebuilds that file, will now rebuild one for each User that has a customized mysql.conf, eg: /usr/local/directadmin/conf/my.cnf.username so that there are no conflict with running backups at the same time using different values. SKIN token value: CUSTOM_MYSQL_CONF=/usr/local/directadmin/conf/othermysql.conf if feature is disabled, or not set in the user.conf, value will be blank, eg ""

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