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

mysql syntax error on upgrade to 3.12 #15100

Closed
JugurthaK opened this issue Nov 4, 2019 · 9 comments
Closed

mysql syntax error on upgrade to 3.12 #15100

JugurthaK opened this issue Nov 4, 2019 · 9 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@JugurthaK
Copy link

JugurthaK commented Nov 4, 2019

Hello guys,

Tried to upgrade Matomo from 3.11 to 3.12,

Seems there is something wrong with the defined charset on some plugins, here is the error code I have when I run install.php :

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DEFAULT CHARSET=utf8' at line 4

Its happening during the installation of LanguagesManager, but even if I disable it, its still happening with Dashboard then with ScheduledReports etc.. They're some plugins who aren't involved. But these (LanguagesManager, Dashboard, ScheduledReports, PrivacyManager, SegmentEditor) returning the same error.

Btw I dont know if the &#039 charcode is generated by my logs console, or is interpreted by mysql..

I've dumped the database, and on table piwik_plugin_setting the DEFAULT CHARSET=utf8 do not contain any ' char..

Its my first issue on Github, sorry if there is not enough informations, I'm available if you need more.

And I'm french, sorry for my bad english.

Best regards,

@sgiehl
Copy link
Member

sgiehl commented Nov 4, 2019

here is the error code I have when I run install.php

@JugurthaK How exactly are you trying to do the update? Did you click the auto update button in UI or did you execute a ./console core:update?

@JugurthaK
Copy link
Author

I'm using a deployment system, so I downloaded the new archive, unzip it, creating my own config.ini.php then running a script (called install.php) to install everything.

@sgiehl
Copy link
Member

sgiehl commented Nov 4, 2019

what exactly is the install.php script doing? maybe you could paste it's content.
Normally it should be enough to replace all the files and execute a ./console core:update afterwards to do an update.

@JugurthaK
Copy link
Author

https://gist.github.com/JugurthaK/2cfe4b74c26e6880ae515ae807e0890d

There is the install.php script. As you can see on line 273, its already doing a ../console core:update

@sgiehl
Copy link
Member

sgiehl commented Nov 4, 2019

But besides copying the files only a ./console core:update should be needed. Haven't looked at the whole script, but it seems to do a lot stuff that is not needed...

@JugurthaK
Copy link
Author

So, you advice me to only do a ./console core:update, or should I download the new archive before ?

@sgiehl
Copy link
Member

sgiehl commented Nov 4, 2019

you need to download the archive before and replace all files with the contents of it. The only file you need to keep from the old install is your config.ini.php. Afterwards you can run a ./console core:update

@JugurthaK
Copy link
Author

The ./console core:update returns a warning to activate the Login plugin (because we're using Ldap Login by default), I did it and after that its telling me Everything is already up to date.

@sgiehl
Copy link
Member

sgiehl commented Nov 4, 2019

./console core:update will only do anything if database updates are required or any other operation needs to be done in order to update anything. If it doesn't do anything, that means the last update didn't include such changes.

See https://matomo.org/docs/update for more information on how to update Matomo

@sgiehl sgiehl closed this as completed Nov 4, 2019
@sgiehl sgiehl added the answered For when a question was asked and we referred to forum or answered it. label Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

2 participants