The MDVA-29389 Magento patch fixes the issue where with Advanced Reporting where the
analytics_collect_data cronjob says: "Port must be configured within host parameter (like localhost:3306)". This patch is available when the Magento Quality Patch (MQP) tool 1.0.7 is installed. The issue is scheduled to be fixed in Magento Commerce 2.4.2.
Affected products and versions
- The patch was designed for Magento Commerce 2.3.4.
- The patch is also compatible with Magento Commerce and Magento Commerce Cloud 2.3.0 - 2.4.1.
Note: the patch can be applicable to other versions. To check if the patch is compatible with your Magento version, run
Steps to reproduce
- In your Magento instance, enable Advanced Reporting.
- Run the following query to insert analytics/general/token value in the DB:
INSERT INTO core_config_data VALUES(NULL,'default',0,'analytics/general/token','ABCDE',now());
- Open your env.php and add port to the host parameter in DB configuration in the following format:
'host' => 'hostname:port',
- Clear cache.
- Execute the
analytics_collect_data job throws an error "Port must be configured within host parameter (like localhost:3306)" when using non-default port to connect to MySQL in env.php.
analytics_collect_data job runs successfully when using default or non-default port to connect to MySQL in env.php.
Apply the patch
For instructions on how to apply an MQP patch, use the following links depending on your Magento product:
- Magento Commerce: DevDocs Apply patches using Magento Quality Patches Tool.
- Magento Commerce Cloud: DevDocs Upgrades and Patches > Apply patches.
To learn more about Magento Quality Patches, refer to:
- Magento Quality Patches released: a new tool to self-serve quality patches.
- Check if patch is available for your Magento issue using Magento Quality Patches.
For info about other patches available in MQP tool, refer to the Patches available in MQP tool section.