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

Error in Piwik: Invalid MySQL Version #12002

Closed
sprhawk opened this issue Sep 5, 2017 · 4 comments
Closed

Error in Piwik: Invalid MySQL Version #12002

sprhawk opened this issue Sep 5, 2017 · 4 comments
Labels
not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Waiting for user feedback Indicates the Matomo team is waiting for feedback from the author or other users.

Comments

@sprhawk
Copy link

sprhawk commented Sep 5, 2017

I got many error messages from my installation:

[error] 13191#13191: *1102 FastCGI sent in stderr: "PHP message: Error in Piwik: Invalid MySQL Version" while reading response header from upstream, client: *****, server: localhost, request: "GET /index.php?module=Marketplace&action=getPremiumFeatures&widget=undefined&idSite=1&period=day&date=today&showtitle=1&random=239 HTTP/1.1"

Piwik version: 3.0.4

I installed piwik on Azure cloud service, using MySQL on Azure service, MySQL version: 5.7

system: ubuntu 16.04 LTS
php: PHP Version 7.0.22-0ubuntu0.16.04.1
php-mysql: Client API library version | mysqlnd 5.0.12-dev - 20150407

@mattab
Copy link
Member

mattab commented Sep 18, 2017

Can you issue a SELECT @@version; query on the MySQL instance and report the result back?

@mattab mattab added this to the 3.2.0 milestone Sep 18, 2017
@sgiehl sgiehl added the Waiting for user feedback Indicates the Matomo team is waiting for feedback from the author or other users. label Sep 20, 2017
@matfax
Copy link

matfax commented Oct 14, 2017

Having the same issue with 3.2.0, Azure MySql reports the wrong version.

@hvcgi
Copy link

hvcgi commented Nov 7, 2017

I have same issue. I cannot access marketplace at all.
Result for SELECT @@Version is 5.7.18. I am using Piwik version 3.2.0.

@kiwi-x
Copy link

kiwi-x commented Nov 13, 2017

Hello. I'm in the same trouble now. (I posted this in #12030, too)
Using like most here a Azure SQL Database.

MySQL [* * *]> select @@Version;
+-----------+
| @@Version |
+-----------+
| 5.7.18 |
+-----------+

but on system summary on the settings page you see

Piwik-Version: 3.2.0
MySQL-Version: 5.6.26.0
PHP-Version: 7.0.22-0ubuntu0.16.04.1

which is the same database version, which is shown when running the status command after connecting to the database:

MySQL [* * *]> status
+-------------
mysql Ver 15.1 Distrib 10.0.31-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

Connection id: 65385
Current database: * * *
Current user: * * @ * *
SSL: Cipher in use is AES256-SHA
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server: MySQL
Server version: 5.6.26.0 MySQL Community Server (GPL)
Protocol version: 10
Connection: * * *.mysql.database.azure.com via TCP/IP
Server characterset: latin1
Db characterset: latin1
Client characterset: utf8mb4
Conn. characterset: utf8mb4
+-------------

-- I changed (for a quick and very dirty check) line 272 in Marketplace/Api/Client.php to this (don't do that - it was just to verify if this is the problem!)

$params['mysql'] = "5.7.18"; // $this->environment->getMySQLVersion();

After that change, I could access the Marketplace.

robocoder added a commit to robocoder/matomo that referenced this issue Feb 12, 2018
robocoder added a commit to robocoder/matomo that referenced this issue Mar 24, 2018
robocoder added a commit to robocoder/matomo that referenced this issue Apr 4, 2018
@mattab mattab closed this as completed in 718eb0e Apr 23, 2018
@mattab mattab added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label May 8, 2018
@mattab mattab removed this from the 3.7.0 milestone Aug 17, 2018
InfinityVoid pushed a commit to InfinityVoid/matomo that referenced this issue Oct 11, 2018
…ct @@Version" (matomo-org#12551)

* Fixes matomo-org#12002 and matomo-org#12030 - azure fallback to "select @@Version"

* Add comment for why @@Version is used instead of going through the connection object.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Waiting for user feedback Indicates the Matomo team is waiting for feedback from the author or other users.
Projects
None yet
Development

No branches or pull requests

6 participants