@chayharley opened this Issue on February 21st 2016

I created a separate database and removed the prefix - when creating the tables, I received this with no way to continue. Can you fix this case?
Thanks

----installation webpage shows:

Creating the Tables

Some tables in your database have the same names as the tables Piwik is trying to create
The following tables have been found in the database:

user, access, site, site_setting, site_url, goal, logger_message, log_action, log_visit, log_conversion_item, log_conversion, log_link_visit_action, log_profiling, option, session, sequence

« Go back and define a Prefix for the Piwik Tables

Delete the detected tables »

@sgiehl commented on February 21st 2016 Member

What are you expecting? In some cases it should be possible to reuse the existing tables.

@chayharley commented on February 22nd 2016

Hi Stefan,
Thanks - I'm expecting the initial installation to not halt at this point. Let me detail the experience to help elaborate the issue.
The initial installation process began, when the database config page came up, I opened a mysql shell and did a CREATE DATABASE (etc), returned to the webpage installer, set no prefix and other details, then clicked next. It worked away for a minute, then halted with the message previously posted.

There was no option to continue, I was required to have a prefix for the tables (understandable for those who haven't full root control over their mysql).
I returned to the previous configuration page and placed the prior default table prefix, giving me piwik.piwik_* (db.tables).

Thanks for reading.

@tsteur commented on February 22nd 2016 Owner

It will only offer to reuse existing tables (in this case the tables without prefix) if there were at least 12 Piwik tables found (not counting any archive_ tables), and if there is at least one user and one website detected in the user / site tables.

In this case it did find at least 12 tables. However, I presume there was no user or no site found. Possibly you already tried to install Piwik once without a prefix and didn't finish it. To fix it you can either delete all Piwik tables without prefix (if you are sure they contain no data etc) or to create a user and a site. Then it should offer to reuse the table. Ideally, the installer would have offered it to you in the first place and continued where needed but this part of the installation is a bit limited currently.

@chayharley commented on February 22nd 2016

If you have time, perhaps you could repeat the action on an empty VM to
see the issue?
Although it does seem a small bug. Feel free to close this ticket.

Here were my exact steps (I checked my bash_history to verify):

The zip was downloaded and unzipped into the webserver path, with
appropriate permissions chmod/chgrp'd.
Install install page launched, and various values filled in.
When I got to the database page, went to PHPMyAdmin and created a user
with a password.
Opened a mysql command shell and ran the following commands:

user@db:/var/www/ssl/phpmyadmin$ cat ~/.mysql_history
_HiStOrYV2
show\040databases;
create\040database\040piwik;
GRANT\040ALL\040PRIVILEGES\040ON\040piwik.*\040to\040'piwikuser'@'localhost';
FLUSH\040PRIVILEGES;
use\040piwik
show\040tables;

returned to the Piwik installation web page, input the DB name, DB
username and removed the prefix.
Clicked Next, and it created the tables, then gave the page and the
messages which I posted originally.

On 02/22/2016 05:00 PM, Thomas Steur wrote:

It will only offer to reuse existing tables (in this case the tables
without prefix) if there were at least 12 Piwik tables found (not
counting any |archive_| tables), and if there is at least one user and
one website detected in the user / site tables.

In this case it did find at least 12 tables. However, I presume there
was no user or no site found. Possibly you already tried to install
Piwik once without a prefix and didn't finish it. To fix it you can
either delete all Piwik tables without prefix (if you are sure they
contain no data etc) or to create a user and a site. Then it should
offer to reuse the table. Ideally, the installer would have offered it
to you in the first place and continued where needed but this part of
the installation is a bit limited currently.


Reply to this email directly or view it on GitHub
https://github.com/piwik/piwik/issues/9815#issuecomment-187061287.

@tsteur commented on February 22nd 2016 Owner

I tried to reproduce using the same steps. Once I let the installation process create the database and once I created the DB myself like you did. In both cases it worked fine without using a table prefix.

I'll close it for now. Maybe you can try to reproduce with a fresh installation of Piwik and a new database?

This Issue was closed on February 22nd 2016
Powered by GitHub Issue Mirror