Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation of clean piwik fails when using alternative portnumber for MySQL #5865

Open
RMastop opened this issue Jul 21, 2014 · 9 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc.

Comments

@RMastop
Copy link
Contributor

RMastop commented Jul 21, 2014

I found a bug in setting up a new environment:

When installing Piwik on a system with MySQL running on an alternative port number, the installation fails.

One could work around this by editing the global config port number. (when in the install process you need to type <IP-Address/Host-name>:)
However this is a workaround from hell, because it will overwritten by the next Piwik update process.

The actual problem is that before you could even start the configuration of the MySQL port number from within the installation process on the web interface, the installation procedure is halted with some unclear message.

  • There needs to be a more clear message send back to the user about not being able to connect to the MySQL server.
  • There needs to be a way to setup Piwik by submitting a custom port number.
@tsteur tsteur added this to the Piwik 2.5.0 milestone Jul 25, 2014
@mattab mattab modified the milestones: Mid term, Short term Oct 12, 2014
@mattab
Copy link
Member

mattab commented Oct 12, 2014

@RMastop do you remember the error message displayed? it would help other users maybe find this issue. Installing Mysql on different port worked a few months ago when I tested it, though we run our tests on default port as well so maybe it's regressed

@RMastop
Copy link
Contributor Author

RMastop commented Nov 5, 2014

Just tested, it works on v. 2.8.3.

When one adds ":" (like ":3307") the config file created contains the custom port number.

The error in piwik 2.0.3 (shown after adding the requested info to step 7 "Setup a Website") was:

A fatal error occurred
The following error just broke Piwik (v2.0.3):
Maximum execution time of 30 seconds exceeded
in
<path_to_piwik_root>\libs\Zend\Db\Adapter\Pdo\Abstract.php line 129
If this error continues to happen you may want to send an error report to your system administrator.

@RMastop RMastop closed this as completed Nov 5, 2014
@RMastop RMastop reopened this Nov 5, 2014
@RMastop
Copy link
Contributor Author

RMastop commented Nov 5, 2014

Just tried to upgrade the 2.0.3 (with the alternative portnumber) to Piwik 2.8.3 and it failes during upgrade processbecause of the following error:
Cannot connect to the database:
SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it.
This may be a temporary issue, try refreshing the page. If the problem persists please contact your Piwik administrator.

I think this is because the alternative portnumber is not written to config.ini.php in the first place.
after adding the line port=3307 to the section [database] in config.ini.php the upgrade completed successfully.
This might still be an issue on updating older versions.

@mattab mattab added Bug For errors / faults / flaws / inconsistencies etc. and removed Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. labels Nov 6, 2014
@Aybee
Copy link

Aybee commented Jan 20, 2016

Just installed Piwik and am not able to set up a port during installation. I need 3307 for a mariaDB. We need an additional input field to change the default port 3306 to another port during installation.

Tried to create a config/global.ini.php with

[database]
port = 3307

But then the install tool tells me that Piwik already is installed.

@RMastop
Copy link
Contributor Author

RMastop commented Jan 20, 2016

@Aybee could you try to remove the port reference from the global config and add the value ":3307" to the hostname/ip-address of the mysql host (f.i. 127.0.0.1:3307) during setup.

That way I was able to install it the first time.

@Aybee
Copy link

Aybee commented Jan 20, 2016

@RMastop I've used a MySQL-DB now and as your trick is not update safe I will not try it again. I think in general we need a field for the port in install tool.

But thank you for your hint anyway.

@RMastop
Copy link
Contributor Author

RMastop commented Jan 20, 2016

@Aybee I agree to that. It doesn't happen to often that we need to use an alternative portnumber, It would help the few that need to run this kind of setup.

@Aybee
Copy link

Aybee commented Jan 20, 2016

Just tested it again. Using the host 127.0.0.1:3307 was enough. No need to change the global config.

Maybe a hint at this field regarding that feature would be beneficial.

@mattab mattab modified the milestones: Long term, Mid term Dec 5, 2016
@tsteur
Copy link
Member

tsteur commented Feb 20, 2024

To save time, easiest way is probably to adjust inline help and point people to an FAQ explaining how to install Matomo when a custom MySQL port is used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

4 participants