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) »
  • Developer Discussion »
  • Unit Testing (Moderator: Michał Mach) »
  • The error "DB Error: insufficient permissions"
Pages: [1]

Author Topic: The error "DB Error: insufficient permissions"  (Read 2415 times)

torenware

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 4
The error "DB Error: insufficient permissions"
May 22, 2010, 01:44:07 am
I'm setting up for test, and somewhere in the call to phpunit, I exit with the error
Code: [Select]
DB_DataObject Error: DB Error: insufficient permissions

Finding this has been hard; AFAICT, none of the error handlers were getting this.  I finally created an exit handler via register_shutdown_function(), and figured out that I'm dying the first time CRM tries to get the settings object.

I've enclosed a stack trace I generated with xdebug.  What am I doing wrong here?



torenware

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 4
Re: The error "DB Error: insufficient permissions"
May 22, 2010, 12:25:27 pm
I think I've resolved the error.  It turns out that the database used by the test system must be called "civicrm_tests_dev", because this database name appears to be hard-wired into the test system.  The mysterious error doesn't tell you this, but if you root around in the $_DB_DATAOBJECT data structure, you can find the following detailed error coming back from MySQL:

Code: [Select]
[nativecode=1044 ** Access denied for user 'crm32svn'@'localhost' to database 'civicrm_tests_dev']
** mysql://crm32svn:testme@localhost/civicrm_tests_dev?new_link=true

I didn't specify civicrm_tests_dev anywhere, and it doesn't appear to be a setting.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • Unit Testing (Moderator: Michał Mach) »
  • The error "DB Error: insufficient permissions"

This forum was archived on 2017-11-26.