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

Step 3: databaseSetup fails during installation: SQL statement error #415

Closed
anonymous-matomo-user opened this issue Nov 8, 2008 · 3 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Milestone

Comments

@anonymous-matomo-user
Copy link

When I install Piwik 0.2.17 for the first time, I get a SQL statement error message when I press “Go!” for Step 3: databaseSetup. I’m running Ubuntu 8.10, with the latest packages needed for LAMP and Piwik.

Here was the error message that appeared:

SQLSTATE42000: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘option ( option_name VARCHAR NOT NULL , option_value LONGT’ at line 1
Backtrace:

  1. /var/www/piwik/libs/Zend/Db/Statement.php(298): Zend_Db_Statement_Pdo→_execute(Array)
  2. /var/www/piwik/libs/Zend/Db/Adapter/Abstract.php(269): Zend_Db_Statement→execute(Array)
  3. /var/www/piwik/libs/Zend/Db/Adapter/Pdo/Abstract.php(206): Zend_Db_Adapter_Abstract→query(‘CREATE TABLE op…’, Array)
  4. /var/www/piwik/core/Piwik.php(1054): Zend_Db_Adapter_Pdo_Abstract→query(‘CREATE TABLE op…’)
  5. /var/www/piwik/plugins/Installation/Controller.php(204): Piwik::createTables()
  6. /var/www/piwik/plugins/Installation/Installation.php(62): Piwik_Installation_Controller→tablesCreation()
  7. [function](internal): Piwik_Installation→startInstallation(Object(Event_Notification))
  8. /var/www/piwik/libs/Event/Dispatcher.php(214): call_user_func_array(Array, Array)
  9. /var/www/piwik/core/PluginsManager.php(348): Event_Dispatcher→addObserver(Array, ‘FrontController…’)
  10. /var/www/piwik/core/PluginsManager.php(237): Piwik_PluginsManager→addPluginObservers(Object(Piwik_Installation))
  11. /var/www/piwik/core/PluginsManager.php(151): Piwik_PluginsManager→loadPlugins()
  12. /var/www/piwik/core/FrontController.php(225): Piwik_PluginsManager→setPluginsToLoad(Array)
  13. /var/www/piwik/index.php(51): Piwik_FrontController→init()
  14. {main}

Keywords: databaseSetup installation sql error

@francois2metz
Copy link

I have the same error on Debian Etch.

@anonymous-matomo-user
Copy link
Author

the solution is quite easy.

When installing piwik without a prefix (’’) option ends up as a reserved word in MySQL. The solution is

a) Add `` around the table/coulumns (would make sense to do at all times
or
b) Used a prefix for your piwik install.

I went with b, and spend ~4min to rename all tables, and re-run the upgrade guide. And bang, it just worked ;)

@mattab
Copy link
Member

mattab commented Nov 24, 2008

cheers, it was fixed a few days ago following your ticket + a few emails from users

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

3 participants