Shared MySQL Database

I currently have OWS running on my web site with an associated MySQL db. Can I run Piwik off the same database without affecting the functioning of either stats package? From the Q&A section it suggests that it should be possible but I wanted to check. Thanks in advance!

Edit: It seems to be working and hasn’t messed up my OWS data but if there is something I know from a ‘good admin’ practice perspective, I would of course appreciate any input. Many thanks!

Ideally every program should use its own database to keep everything structured nicely. But it is also possible to save two websites or even two Piwik instances in one database as you have the possibility to set a table prefix on setup so they don’t collide with the tables of the other software.


Thanks for the input. I used the default Piwik table prefix when I configured Piwik for use with the MySQL database and it seems to have worked without any data conflict. I assume OWS had its own data prefix when I set it up, I can’t remember now.

The default table prefix of piwik is piwik_, so there shouldn’t be any conflicts unless another software uses tables called piwik_something.

Thanks! I had a quick look at the table data names in phpMyAdmin 3.3.7 and the piwik set is indeed using ‘piwik_’ and OWA is using ‘OWA_’ so there should be no conflict.

I did notice that the Piwik web interface was running extremely slowly and also wasn’t tracking all the hits to the 3 web sites I set up earlier, and there were some errors in the System Check on the MySQL database, as below.

I looked at the version number in phpMyAdmin 3.3.7 and it states, so I’m assuming the mysql database does not meet the minimum requirements for Piwik which is 5.5?

Variable_name Value
protocol_version 10
version 5.0.96-log
version_comment MySQL Community Server (GPL)
version_compile_machine x86_64
version_compile_os unknown-linux-gnu

Using LOAD DATA INFILE will greatly speed Piwik’s archiving process up. To make it available to Piwik, try updating your PHP & MySQL software and make sure your database user has the FILE privilege.
If your Piwik server tracks high traffic websites (eg. > 100,000 pages per month), we recommend to try fix this problem.
Error: LOAD DATA INFILE failed… Error was:
Try #1: LOAD DATA INFILE : SQLSTATE[28000]: Invalid authorization specification: 1045 Access denied for user ‘analytics’@’%’ (using password: YES)[28000],
Try #2: LOAD DATA LOCAL INFILE : SQLSTATE[42000]: Syntax error or access violation: 1148 The used command is not allowed with this MySQL version[42000]
Troubleshooting: FAQ on

You are right that your web host has disabled LOAD DATA INFILE. But while Piwik is faster with it, there should be no problems if it isn’t available (which is the case at most shared hosters)
Are there any other errors?

Hi Findus23, nope those are the only errors, except for Geo-Location.

I was just editing my earlier reply after digging around with phpMyAdmin. I think the database is too old as 5.0.96 dates back to 2012 and the minimum Piwik requires is 5.5. I guess I just assumed MySQL was good enough after the web host finally updated their PHP and informed me of the version number (5.5).


I am not sure if this means you are using MySQL 5.0, as this exact version is over 5 years old and the first MySQL 5.0 release was in 2005. This is far to old to use any modern PHP application.

I ran the SHOW VARIABLES LIKE “%version%”; command in MySQL command line so it can only mean one thing really. My web host was running PHP 5.2 until the end of the last year, so it seems there is a pattern of running out of date software and languages, and their justification was that it was more stable and fewer bugs and that their customers didn’t want an upgrade before, but I suspect this is sales talk. Thanks very much for your input.

Edit: I ran a command on a php page ‘<?php phpinfo(); ?>’ to show the php version of the web server, and it shows that the PHP version is 5.5.9:

PHP Version 5.5.9-1ubuntu4.9

MySQL version I think is 5.5.43 from this?

MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 5.5.43
MYSQL_SOCKET /var/run/mysqld/mysqld.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib/x86_64-linux-gnu -lmysqlclient_r

While I can understand using long term suppor versions for improved stability (as debian is doing it), your webhost is so far out of date (Debian Wheezy released in 2013, came with PHP 5.4 and MySQL 5.5) that I can only recommend you to look for another host as fast as you can.

I think this is just the version of the MySQL-client-module of PHP 5.5 and not the version of the MySQL server

1 Like

You are right. I had a confirmation back from the web host and the version numbers are MySQL 5.0.51a and Apache 228, so it’s not going to work. I will try using a remote MySQL database with another web host I have for my other sites, which although not my preferred option is the only way forwards besides changing web host. Cheers.