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) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 3.0 Release Testing »
  • DB Error: can not create
Pages: [1]

Author Topic: DB Error: can not create  (Read 4445 times)

jacoblee

  • Guest
DB Error: can not create
August 13, 2009, 04:21:03 pm
When I ran the DB upgrade script I got the following error:

unrecoverable error
    Sorry. A non-recoverable error has occurred.

    DB Error: can not create

    Database Error Code: Can't create table './focusnor_ftest/civicrm_navigation.frm' (errno: 150), 1005

    Return to home page.

Error Details:

Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=> -15
    [message] => DB Error: can not create
    [mode] => 16
    [debug_info] => -- CRM-4407
    -- Add civicrm_navigation table for CiviCRM Menu
    CREATE TABLE civicrm_navigation (
        id int unsigned NOT NULL AUTO_INCREMENT  ,
        domain_id int unsigned NOT NULL   COMMENT 'Which Domain is this navigation item for',
        label varchar(255)    COMMENT 'Navigation Title',
        name varchar(255)    COMMENT 'Internal Name',
        url varchar(255)    COMMENT 'url in case of custom navigation link',
        permission varchar(255)    COMMENT 'Permission for menu item',
        permission_operator varchar(3)    COMMENT 'Permission Operator',
        parent_id int unsigned    COMMENT 'Parent navigation item, used for grouping',
        is_active tinyint    COMMENT 'Is this navigation item active?',
        has_separator tinyint    COMMENT 'If separator needs to be added after this menu item',
        weight int    COMMENT 'Ordering of the navigation items in various blocks.'
        ,
        PRIMARY KEY ( id )
        ,     
        CONSTRAINT FK_civicrm_navigation_domain_id FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id) ,     
        CONSTRAINT FK_civicrm_navigation_parent_id FOREIGN KEY (parent_id) REFERENCES civicrm_navigation(id) ON DELETE CASCADE 
    )  ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci [nativecode=1005 ** Can't create table './focusnor_ftest/civicrm_navigation.frm' (errno: 150)]
    [type] => DB_Error
    [user_info] => -- CRM-4407
    -- Add civicrm_navigation table for CiviCRM Menu
    CREATE TABLE civicrm_navigation (
        id int unsigned NOT NULL AUTO_INCREMENT  ,
        domain_id int unsigned NOT NULL   COMMENT 'Which Domain is this navigation item for',
        label varchar(255)    COMMENT 'Navigation Title',
        name varchar(255)    COMMENT 'Internal Name',
        url varchar(255)    COMMENT 'url in case of custom navigation link',
        permission varchar(255)    COMMENT 'Permission for menu item',
        permission_operator varchar(3)    COMMENT 'Permission Operator',
        parent_id int unsigned    COMMENT 'Parent navigation item, used for grouping',
        is_active tinyint    COMMENT 'Is this navigation item active?',
        has_separator tinyint    COMMENT 'If separator needs to be added after this menu item',
        weight int    COMMENT 'Ordering of the navigation items in various blocks.'
        ,
        PRIMARY KEY ( id )
        ,     
        CONSTRAINT FK_civicrm_navigation_domain_id FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id) ,     
        CONSTRAINT FK_civicrm_navigation_parent_id FOREIGN KEY (parent_id) REFERENCES civicrm_navigation(id) ON DELETE CASCADE 
    )  ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci [nativecode=1005 ** Can't create table './focusnor_ftest/civicrm_navigation.frm' (errno: 150)]
    [to_string] => [db_error: message="DB Error: can not create" code=-15 mode=callback callback=CRM_Core_Error::handle prefix="" info="-- CRM-4407
    -- Add civicrm_navigation table for CiviCRM Menu
    CREATE TABLE civicrm_navigation (
        id int unsigned NOT NULL AUTO_INCREMENT  ,
        domain_id int unsigned NOT NULL   COMMENT 'Which Domain is this navigation item for',
        label varchar(255)    COMMENT 'Navigation Title',
        name varchar(255)    COMMENT 'Internal Name',
        url varchar(255)    COMMENT 'url in case of custom navigation link',
        permission varchar(255)    COMMENT 'Permission for menu item',
        permission_operator varchar(3)    COMMENT 'Permission Operator',
        parent_id int unsigned    COMMENT 'Parent navigation item, used for grouping',
        is_active tinyint    COMMENT 'Is this navigation item active?',
        has_separator tinyint    COMMENT 'If separator needs to be added after this menu item',
        weight int    COMMENT 'Ordering of the navigation items in various blocks.'
        ,
        PRIMARY KEY ( id )
        ,     
        CONSTRAINT FK_civicrm_navigation_domain_id FOREIGN KEY (domain_id) REFERENCES civicrm_domain(id) ,     
        CONSTRAINT FK_civicrm_navigation_parent_id FOREIGN KEY (parent_id) REFERENCES civicrm_navigation(id) ON DELETE CASCADE 
    )  ENGINE=InnoDB DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci [nativecode=1005 ** Can't create table './focusnor_ftest/civicrm_navigation.frm' (errno: 150)]"]
)


jacoblee

  • Guest
Re: DB Error: can not create
August 13, 2009, 04:45:14 pm
Update, I did an unistall and tried running the script again on got this error:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 76 bytes) in /home/focusnor/public_html/focus-test-0809/administrator/components/com_civicrm/civicrm/packages/PEAR.php on line 872

I can / have allowed up to 128mb and it makes no difference it runs out of memory.

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: DB Error: can not create
August 13, 2009, 06:00:26 pm

the first message indicated that you did not have create table privileges for that db user

You did an uninstall and tried to install a 3.0 alpha2 version of civicrm?

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

jacoblee

  • Guest
Re: DB Error: can not create
August 13, 2009, 10:53:10 pm
I did an uninstall and then upgrade from 2.2 to 3.0 Alpha 2 everything went fine till I did the DB upgrade script and that is when the first message came up.

I have all privileges selected for the user account on the DB...

Thanks for your help.

Jacob Lee

jacoblee

  • Guest
Re: DB Error: can not create
August 14, 2009, 05:04:50 pm
Anybody any help or am I just SOL?

I restored a backup and upgraded from 2.2.2 to 2.2.8 and then to 3.0 Alpha 2 and the same problem occurred. It has something to do with 3.0 for sure.

J

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: DB Error: can not create
August 14, 2009, 05:57:51 pm

1. can you turn off any non-essential modules and see if that helps things

2. if not, can you increase your php memory to 128M and see if that allows it to succeed

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

jacoblee

  • Guest
Re: DB Error: can not create
August 16, 2009, 01:37:59 pm
I upped the memory to 256 and got the same error:

DB Error: can not create

Database Error Code: Can't create table './focusnor_foctest/civicrm_navigation.frm' (errno: 150), 1005

ect...

Anything else I should try?

jacoblee

  • Guest
Re: DB Error: can not create
August 16, 2009, 03:25:20 pm
Just converted the database from MYISAM to InnoDB and it seems to got further before it died on upgrade:



unrecoverable error
    Sorry. A non-recoverable error has occurred.

    DB Error: unknown error

    Database Error Code: Error on rename of './focusnor_foctest/civicrm_group_organization' to './focusnor_foctest/#sql2-13fb-e8335' (errno: 152), 1025

    Return to home page.

Error Details:

Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=> -1
    [message] => DB Error: unknown error
    [mode] => 16
    [debug_info] => -- CRM-4610
    ALTER TABLE `civicrm_group_organization`
        DROP FOREIGN KEY `FK_civicrm_group_organization_group_id`,
        DROP FOREIGN KEY `FK_civicrm_group_organization_organization_id` [nativecode=1025 ** Error on rename of './focusnor_foctest/civicrm_group_organization' to './focusnor_foctest/#sql2-13fb-e8335' (errno: 152)]
    [type] => DB_Error
    [user_info] => -- CRM-4610
    ALTER TABLE `civicrm_group_organization`
        DROP FOREIGN KEY `FK_civicrm_group_organization_group_id`,
        DROP FOREIGN KEY `FK_civicrm_group_organization_organization_id` [nativecode=1025 ** Error on rename of './focusnor_foctest/civicrm_group_organization' to './focusnor_foctest/#sql2-13fb-e8335' (errno: 152)]
    [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="-- CRM-4610
    ALTER TABLE `civicrm_group_organization`
        DROP FOREIGN KEY `FK_civicrm_group_organization_group_id`,
        DROP FOREIGN KEY `FK_civicrm_group_organization_organization_id` [nativecode=1025 ** Error on rename of './focusnor_foctest/civicrm_group_organization' to './focusnor_foctest/#sql2-13fb-e8335' (errno: 152)]"]
)


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: DB Error: can not create
August 16, 2009, 03:36:36 pm

At this point, your best bet might be to start with a clean slate and try an install of CiviCRM v2.2.8. v3.0 is still in alpha and not recommended for production use

if you have data in your current db, you might want to consider hiring someone from http://civicrm.org/professional/

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

jacoblee

  • Guest
Re: DB Error: can not create
August 16, 2009, 06:19:03 pm
Donald,

I have done it the clean install way and it works.

It is with data that I am testing and well that is the thing that is going to matter to people is how do they upgrade with data in the database. If you can't upgrade with data well then civi 3.0 will be worthless to all the prior user base.

Anybody else have any ideas.

Development team do you want any logs or anything from me to see what is going on?


jacoblee

  • Guest
Re: DB Error: can not create
August 18, 2009, 01:01:38 pm
After working on this problem and reading through old boards. I discovered the problem is that when you restore a database it changes the mysql type. I was changing the mysql type back but it screws up the keys ect.

I fixed it and got it working.

Loving CIVI 3.0 allot of improvements.

Thanks for all those who helped.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 3.0 Release Testing »
  • DB Error: can not create

This forum was archived on 2017-11-26.