Trying to force reinstall


#1

I have been without Piwik for 2 weeks now. Ever since I tried to upgrade from 1.4 to 1.5. I’ve also tried to upgrade to 1.5.1 but I keep getting the same error as posted in another thread. I’m not having any luck getting help via email so I’m trying to force a new installation of Piwik as per the instructions on Installation - Analytics Platform - Matomo

It says there:

“If you install Piwik specifying an existing database containing Piwik data, the installation process will automatically detect that the Piwik tables already exist. You will be able to choose to either keep your existing data, or delete the tables and start from a clean database.”

However, I’m am not being given the choice to keep my existing data. Instead I get this:

Some tables in your database have the same names as the tables Piwik is trying to create
« Go back and define a Prefix for the Piwik Tables
Delete the detected tables »

Please advise what I need to do so I don’t lose my data.

thanks
Gillian


(Matthieu Aubry) #2

When you reinstall Piwik, are you sure you are re-installing the EXACT same version that was used before?

you can’t “reuse” tables when you try to reinstall a newer version on top of an old one. please make sure it’s the same and it should work?


#3

I was probably trying to reinstall a newer version over an older one. I tried so many things I lost touch with exactly what version I was using.

In the end I solved the problems by going to my hosting techs and asking them to reinstall all the files from before I tried to upgrade. So now everything’s working again but at version 1.4

I’ll maybe try the upgrade to 1.5.1 when I’m feeling more courageous :)-D


(Matthieu Aubry) #4

1.5.1 update from 1.4 should be very safe, just make sure you leave the update running and not double click/close during upgrade.


#5

The problem is, that even if I try to reinstall the same version (1.5.1 in my case) for some reason (after deleting config.ini.php), I get the same message. I do not have an option to keep the tables - either to change the prefix of the tables or to delete them. I solved it for me through a little trick - I dump the db before reinstalling, then let piwik create an empty new db and then import the dump back. :slight_smile:

This should be actually my next report in forum, but gillian did it. I’d only like matt to know, that it doesn’t work even if you try to reinstall the same version. For me at least …


(Matthieu Aubry) #6

Thank you for insisting!! I verified the bug and you are right.

please apply this patch: http://dev.piwik.org/trac/changeset/5024

Cheers


(vipsoft) #7

gillian: can you try logging into your piwik dashboard, and see if it’s ok now? You should have a 1.5.1 compatible database schema.

FYI I compared your schema with mine, and manually applied the changes for Piwik 1.2.5 and (part of) 1.5.


#8

@matt
Thank you very much! It works!


#9

[quote=Anthon]
gillian: can you try logging into your piwik dashboard, and see if it’s ok now? You should have a 1.5.1 compatible database schema.

FYI I compared your schema with mine, and manually applied the changes for Piwik 1.2.5 and (part of) 1.5.[/quote]

Hi Anthon

Thanks for your help.

As far as I can see nothing’s changed in the dashboard since I got my hosting techs to reinstall the backup to 1.4. Once that had been done I was able to see the data. I’m not seeing the stuff you did in the background, of course.

On the right hand side I see the message “New Update: Piwik 1.5.1”

And when I click on another tab I see the message “The Piwik configuration file (config/config.ini.php) is not writable, some of your changes might not be saved.
Please change permissions of the config file to make it writable.”

Should I go ahead and try the update?

Gillian


(vipsoft) #10

I applied the changes to your piwik database. Your piwik3 database needs more work to bring up-to-date.


#11

[quote=Anthon]
I applied the changes to your piwik database. Your piwik3 database needs more work to bring up-to-date.[/quote]

The piwik3 database was from when I was trying to work around the original errors so it’s not in use.

I went ahead and upgraded to 1.5.1. after your changes to the piwik database and immediately after upgrade all appeared to be well. I added some more sites OK and my old stats were showing. However, today, when I went to add some more sites I seem to have come full circle and and now getting the original error again, i.e.:

Mysqli prepare error: Unknown column ‘revenue_subtotal’ in ‘field list’

I haven’t manually touched anything since this most recent attempt to upgrade to 1.5.1 when I added the new sites successfully. I do, however, have it set up to automatically cache the stats so don’t know whether that might be causing the error.

Gillian