CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Upgrading database, fresh install, previous 4.0 DB.
Pages: [1]

Author Topic: Upgrading database, fresh install, previous 4.0 DB.  (Read 2158 times)

rchapman

  • I post occasionally
  • **
  • Posts: 77
  • Karma: 0
Upgrading database, fresh install, previous 4.0 DB.
October 24, 2012, 06:37:52 am
[Error: Upgrade DB to 4.2.alpha1: SQL]
Error Field   Error Value
Type   DB_Error
Code   -1
Message   DB Error: unknown error
Mode   16
UserInfo   DROP TRIGGER IF EXISTS civicrm_acl_before_insert [nativecode=1227 ** Access denied; you need the SUPER privilege for this operation]
DebugInfo   DROP TRIGGER IF EXISTS civicrm_acl_before_insert [nativecode=1227 ** Access denied; you need the SUPER privilege for this operation]
PEAR_Exception: DB Error: unknown error in unknown on line unknown
- DB_Error: DB Error: unknown error in unknown on line unknown
Exception trace
#   Function   Location
0   CRM_Core_Error::exceptionHandler(Object(DB_Error))   unknown:unknown
1   call_user_func(Array, Object(DB_Error))   /usr/local/www/htdocs/joomla/administrator/components/com_civicrm/civicrm/packages/PEAR.php:931
2   PEAR_Error->PEAR_Error('DB Error: unknow…', -1, 16, Array, 'DROP TRIGGER IF …')   /usr/local/www/htdocs/joomla/administrator/components/com_civicrm/civicrm/packages/DB.php:968
3   DB_Error->DB_Error(-1, 16, Array, 'DROP TRIGGER IF …')   /usr/local/www/htdocs/joomla/administrator/components/com_civicrm/civicrm/packages/PEAR.php:564
4   PEAR->raiseError(null, -1, null, null, 'DROP TRIGGER IF …', 'DB_Error', true)   /usr/local/www/htdocs/joomla/administrator/components/com_civicrm/civicrm/packages/DB/common.php:1903
5   DB_common->raiseError(-1, null, null, null, '1227 ** Access d…')   /usr/local/www/htdocs/joomla/administrator/components/com_civicrm/civicrm/packages/DB/mysql.php:898
6   DB_mysql->mysqlRaiseError()   /usr/local/www/htdocs/joomla/administrator/components/com_civicrm/civicrm/packages/DB/mysql.php:327
7   DB_mysql->simpleQuery('DROP TRIGGER IF …')   /usr/local/www/htdocs/joomla/administrator/components/com_civicrm/civicrm/packages/DB/common.php:1216
8   DB_common->query('DROP TRIGGER IF …')   /usr/local/www/htdocs/joomla/administrator/components/com_civicrm/civicrm/packages/DB/DataObject.php:2421
9   DB_DataObject->_query('DROP TRIGGER IF …')   /usr/local/www/htdocs/joomla/administrator/components/com_civicrm/civicrm/packages/DB/DataObject.php:1613
10   DB_DataObject->query('DROP TRIGGER IF …')   /usr/local/www/htdocs/joomla/administrator/components/com_civicrm/civicrm/CRM/Core/DAO.php:155
11   CRM_Core_DAO->query('DROP TRIGGER IF …', true)   /usr/local/www/htdocs/joomla/administrator/components/com_civicrm/civicrm/CRM/Core/DAO.php:922
12   CRM_Core_DAO::executeQuery('DROP TRIGGER IF …')   /usr/local/www/htdocs/joomla/administrator/components/com_civicrm/civicrm/CRM/Logging/Schema.php:123
13   CRM_Logging_Schema->dropTriggers(null)   /usr/local/www/htdocs/joomla/administrator/components/com_civicrm/civicrm/CRM/Core/DAO.php:1535
14   CRM_Core_DAO::triggerRebuild()   /usr/local/www/htdocs/joomla/administrator/components/com_civicrm/civicrm/CRM/Upgrade/Incremental/php/FourTwo.php:386
15   CRM_Upgrade_Incremental_php_FourTwo::task_4_2_alpha1_runSql(Object(CRM_Queue_TaskContext), '4.2.alpha1')   unknown:unknown
16   call_user_func_array(Array, Array)   /usr/local/www/htdocs/joomla/administrator/components/com_civicrm/civicrm/CRM/Queue/Task.php:79
17   CRM_Queue_Task->run(Object(CRM_Queue_TaskContext))   /usr/local/www/htdocs/joomla/administrator/components/com_civicrm/civicrm/CRM/Queue/Runner.php:186
18   CRM_Queue_Runner->runNext(true)   /usr/local/www/htdocs/joomla/administrator/components/com_civicrm/civicrm/CRM/Queue/Page/AJAX.php:44
19   {closure}()   /usr/local/www/htdocs/joomla/administrator/components/com_civicrm/civicrm/CRM/Queue/ErrorPolicy.php:80
20   CRM_Queue_ErrorPolicy->call(Object(Closure))   /usr/local/www/htdocs/joomla/administrator/components/com_civicrm/civicrm/CRM/Queue/Page/AJAX.php:47
21   CRM_Queue_Page_AJAX::runNext(Array)   unknown:unknown
22   call_user_func(Array, Array)   /usr/local/www/htdocs/joomla/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php:185
23   CRM_Core_Invoke::invoke(Array)   /usr/local/www/htdocs/joomla/administrator/components/com_civicrm/admin.civicrm.php:87
24   civicrm_invoke()   /usr/local/www/htdocs/joomla/administrator/components/com_civicrm/admin.civicrm.php:40
25   require_once('/usr/local/www/h…')   /usr/local/www/htdocs/joomla/libraries/joomla/application/component/helper.php:388
26   JComponentHelper::executeComponent('/usr/local/www/h…')   /usr/local/www/htdocs/joomla/libraries/joomla/application/component/helper.php:357
27   JComponentHelper::renderComponent('com_civicrm')   /usr/local/www/htdocs/joomla/administrator/includes/application.php:152
28   JAdministrator->dispatch()   /usr/local/www/htdocs/joomla/administrator/index.php:46
29   {main}   


is it me, or is this not very descriptive?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Upgrading database, fresh install, previous 4.0 DB.
October 24, 2012, 10:13:11 am

the error message is technical but very descriptive :)

check this line:

DROP TRIGGER IF EXISTS civicrm_acl_before_insert [nativecode=1227 ** Access denied; you need the SUPER privilege for this operation]

seems like you have logging enabled. and you need mysql SUPER privileges to use logging and triggers

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

jclemo

  • I’m new here
  • *
  • Posts: 15
  • Karma: 1
  • CiviCRM version: 4.1
  • CMS version: Drupal 7
  • MySQL version: 5.0.95
  • PHP version: 5.3.10
Re: Upgrading database, fresh install, previous 4.0 DB.
October 25, 2012, 12:46:15 am
I've hit the same problem.
I've checked logging is defiantly off
challenge seems to be that my cpanel doesn't let me add a superuser privilege (or even a trigger permission). Couple of questions
1) Anyone know a way round the cpanel issue (for someone with a moderate tech expertise)
2) when trying to find an answer to this I found a number of pages saying I should never grant superuser privileges to a production web application due to security implications? Any comments.
3) the site is still in maintenance mode but seems to be working ok - what's likely to happen if I just leave it (I'm more thinking do I need to keep the site off whilst I sort this)? To rerun the script I guess I need to restore the backup database first?

cheers Jon

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Upgrading database, fresh install, previous 4.0 DB.
October 25, 2012, 04:17:16 am
You should ask your host about this. Note that in MySQL 5.0 "DROP TRIGGER" requires the SUPER privilege http://dev.mysql.com/doc/refman/5.0/en/drop-trigger.html but in MySQL 5.5 http://dev.mysql.com/doc/refman/5.5/en/drop-trigger.html it doesn't.

I don't know if that's relevant for you per se, but anyhow if you had MySQL 5.5, it sounds like this would not be an issue. :)
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

jclemo

  • I’m new here
  • *
  • Posts: 15
  • Karma: 1
  • CiviCRM version: 4.1
  • CMS version: Drupal 7
  • MySQL version: 5.0.95
  • PHP version: 5.3.10
Re: Upgrading database, fresh install, previous 4.0 DB.
October 25, 2012, 10:35:07 am
FYI response from our host:

"Unfortunately it is not currently possible to grant TRIGGER access - This is a limitation with the 5.0 version of MySQL currently in use on our systems, we are however currently in the process of updating our systems to MySQL version 5.1 (which enables support for TRIGGER access to individual users) and would expect this to be available within the next few weeks at most."


Which on re-reading the update instruction is my own fault

"MySQL 5.0.x or higher with InnoDB support : CiviCRM is compatible the current generally available MySQL release. Note that MySQL 5.1 is recommended for new installations and for sites during upgrades as CiviCRM is beginning to use Triggers more (eg to support multi-lingual installations), which require SUPER privileges in MySQL 5.0."

wondered however if it is making this clearer e.g. if you do not have super privileges upgrade will fail

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Upgrading database, fresh install, previous 4.0 DB.
October 25, 2012, 02:47:00 pm

was logging ever turned on in your install?

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

jclemo

  • I’m new here
  • *
  • Posts: 15
  • Karma: 1
  • CiviCRM version: 4.1
  • CMS version: Drupal 7
  • MySQL version: 5.0.95
  • PHP version: 5.3.10
Re: Upgrading database, fresh install, previous 4.0 DB.
October 26, 2012, 05:10:18 am
not as far as I am aware - was turned off when I checked before upgrade

itkadmin

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 3.4
  • CMS version: Drupal 6.22
  • MySQL version: 5.0.92
  • PHP version: 5.3.5
Re: Upgrading database, fresh install, previous 4.0 DB.
December 11, 2012, 06:27:07 am
We had the same issue upgrading. We use a VPS, so the solution was to use phpMyAdmin from the WHM, (not CPanel) and grant SUPER privileges to the account that civiCRM uses to connect to the database. We ran the update, which seems to have gone fine, went back to phpMyAdmin and set the privileges back to what they should be. I'm not sure what you would do if you were on a shared host using Vpanel only.

Luciano S.

  • I post occasionally
  • **
  • Posts: 83
  • Karma: 2
  • iXiam Team Leader
  • CiviCRM version: 4.2+ / 4.3+ / 4.4+
  • CMS version: Drupal
  • MySQL version: 5.1+ / 5.5+
  • PHP version: 5.3+ / 5.4+
Re: Upgrading database, fresh install, previous 4.0 DB.
February 15, 2013, 08:49:58 am
Hi

I'm facing same issue using when installing CiviCRM Extensions, using the API in a Drupal Module and so.
My ISP doesn't allow me the set SUPER privileges to user in DB server.

Why this SUPER privileges are necessary? to install Extensions, using the API? I couldn't figure out where exactly these TRIGGER operations are called

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Upgrading database, fresh install, previous 4.0 DB.

This forum was archived on 2017-11-26.