MySQL + Non-Standard Port
Currently, very few parts of WHM/cPanel supports accessing a MySQL server using a non-standard port (remote or local).
A quick grep shows that some or all of the following files need to be updated to support port numbers other than 3306:
/usr/local/cpanel/Cpanel/EximStats/ConnectDB.pm
/usr/local/cpanel/Cpanel/MysqlUtils/Connect.pm
/usr/local/cpanel/Cpanel/TailWatch/Eximstats.pm
/usr/local/cpanel/base/horde/config/conf.php
/usr/local/cpanel/base/3rdparty/roundcube/config/db.inc.php
/usr/local/cpanel/bin/leechprotect
/usr/local/cpanel/scripts/optimize_eximstats
/usr/bin/mysql_setpermission
/usr/local/cpanel/Cpanel/MysqlUtils/Connect.pm
/usr/local/cpanel/Cpanel/Mysql.pm
/usr/local/cpanel/sqloptimizer/analyze_sql
/usr/local/cpanel/bin/hulkdsetup
/usr/local/cpanel/bin/ldapsetup
/usr/local/cpanel/bin/mysqluserstore
/usr/local/cpanel/bin/build_mydns_conf
/usr/local/cpanel/scripts/update_db_cache
/usr/local/cpanel/scripts/optimize_eximstats
/usr/local/cpanel/scripts/restartsrv_mysql
/usr/local/cpanel/scripts/exportmydnsdb
/usr/local/cpanel/scripts/importmydnsdb
Most notably, Eximstats (and subsequently, the Mail Delivery Reports feature) will not work at all unless I manually edit some of the above files.
Mail delivery reports are very important to the operation of our website, as if a customer reports not receiving critical purchase confirmation information (without which, they cannot access their purchased products) this is something we need to investigate A.S.A.P. to ensure there's no issue on our end preventing mail delivery.
I'm not a Perl programmer, but it seems easy enough to implement an additional sub, something like
- sub getmydbhost {
- my $port = _getmydbparm( 'port', @_ );
- if ($port) {
- return $port;
- }
- else {
- return 3306;
- }
- }
To use /usr/local/cpanel/Cpanel/EximStats/ConnectDB.pm as an example:
- my $dbhost = Cpanel::MysqlUtils::MyCnf::Basic::getmydbhost('root') || 'localhost';
- my $dbport = Cpanel::MysqlUtils::MyCnf::Basic::getmydbport('root') || '3306';
- my $cpconf_ref = Cpanel::Config::LoadCpConf::loadcpconf();
- $dbh = eval { DBI->connect( "DBI:mysql:$database:$dbhost:$dbport" . ( $cpconf_ref->{'mysql_version'} >= 4.1 ? ';mysql_multi_statements=1;mysql_server_prepare=1' : '' ), $dbuser, $dbpassword ); }
- unless ($dbh) {
I hope this can be implemented, I would appreciate it greatly :)
There will be the ability to connect to non standard remote MySQL ports in 11.52.
There will be the ability to connect to non standard remote MySQL ports in 11.52.
There will be the ability to connect to non standard remote MySQL ports in 11.52.
There will be the ability to connect to non standard remote MySQL ports in 11.52.
This makes me very happy, thank you :)
Along with the recent change to allow update staging to be moved to another directory, I'm very impressed with the recent behind-the-scenes changes that may seem small or irrelevant to most people but are incredibly useful in certain fringe cases.
This makes me very happy, thank you :)
Along with the recent change to allow update staging to be moved to another directory, I'm very impressed with the recent behind-the-scenes changes that may seem small or irrelevant to most people but are incredibly useful in certain fringe cases.
DragonByte Tech,
I'm glad to help. It's funny that you mention Staging Dirs. That's another project worked on by my team. Team Spiderpig. Please let me know if you want to try it out.
Thanks!
Travis
DragonByte Tech,
I'm glad to help. It's funny that you mention Staging Dirs. That's another project worked on by my team. Team Spiderpig. Please let me know if you want to try it out.
Thanks!
Travis
We do take advantage of the update staging directory on one of our servers :)
For the longest time we were stuck on 11.45 due to the space change requirement (60 GB SSD for the OS partition, so /usr only has 9.7 GB in total). By blanking pretty much every log file in existence and uninstalling a few core apps we didn't use (removed all webmail apps other than Squirrelmail and removed old version archives), we managed to get onto 11.48 I think it was, which allowed us to then move to 11.50.
We do take advantage of the update staging directory on one of our servers :)
For the longest time we were stuck on 11.45 due to the space change requirement (60 GB SSD for the OS partition, so /usr only has 9.7 GB in total). By blanking pretty much every log file in existence and uninstalling a few core apps we didn't use (removed all webmail apps other than Squirrelmail and removed old version archives), we managed to get onto 11.48 I think it was, which allowed us to then move to 11.50.
Replies have been locked on this page!