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

separate database - tables without prefix not allowed? #9815

Closed
ghost opened this issue Feb 21, 2016 · 5 comments
Closed

separate database - tables without prefix not allowed? #9815

ghost opened this issue Feb 21, 2016 · 5 comments
Assignees
Labels
worksforme The issue cannot be reproduced and things work as intended.
Milestone

Comments

@ghost
Copy link

ghost commented Feb 21, 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 »

@ghost ghost changed the title separate databse - tables without prefix not allowed? separate database - tables without prefix not allowed? Feb 21, 2016
@sgiehl
Copy link
Member

sgiehl commented Feb 21, 2016

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

@ghost
Copy link
Author

ghost commented Feb 22, 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
Copy link
Member

tsteur commented Feb 22, 2016

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.

@ghost
Copy link
Author

ghost commented Feb 22, 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
HiStOrY_V2
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
#9815 (comment).

@tsteur
Copy link
Member

tsteur commented Feb 22, 2016

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?

@tsteur tsteur closed this as completed Feb 22, 2016
@tsteur tsteur added the worksforme The issue cannot be reproduced and things work as intended. label Feb 22, 2016
@tsteur tsteur added this to the 2.16.1 milestone Feb 22, 2016
@tsteur tsteur self-assigned this Feb 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

2 participants