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 »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • problem with load mysql dump
Pages: [1]

Author Topic: problem with load mysql dump  (Read 2188 times)

vrazbros

  • Guest
problem with load mysql dump
January 12, 2008, 03:46:44 am
CREATE TABLE `civicrm_acl` (
`id` int(10) unsigned NOT NULL auto_increment COMMENT 'Unique table ID',
`domain_id` int(10) unsigned NOT NULL COMMENT 'Which Domain owns this contact',
`name` varchar(64) collate utf8_unicode_ci default NULL COMMENT 'ACL Name.',
`deny` tinyint(4) NOT NULL default '0' COMMENT 'Is this ACL entry Allow  (0) or Deny (1) ?',
`entity_table` varchar(64) collate utf8_unicode_ci NOT NULL COMMENT 'Table of the object possessing this ACL entry (Contact, Group, or ACL Group)',
`entity_id` int(10) unsigned default NULL COMMENT 'ID of the object possessing this ACL',
`operation` enum('All','View','Edit','Create','Delete','Grant','Revoke') collate utf8_unicode_ci NOT NULL COMMENT 'What operation does this ACL entry control?',
`object_table` varchar(64) collate utf8_unicode_ci default NULL COMMENT 'The table of the object controlled by this ACL entry',
`object_id` int(10) unsigned default NULL COMMENT 'The ID of the object controlled by this ACL entry',
`acl_table` varchar(64) collate utf8_unicode_ci default NULL COMMENT 'If this is a grant/revoke entry, what table are we granting?',
`acl_id` int(10) unsigned default NULL COMMENT 'ID of the ACL or ACL group being granted/revoked',
`is_active` tinyint(4) default NULL COMMENT 'Is this property active?',
PRIMARY KEY  (`id`),
KEY `index_acl_id` (`acl_id`),
KEY `FK_civicrm_acl_domain_id` (`domain_id`),
CONSTRAINT `FK_civicrm_acl_domain_id` FOREIGN KEY (`domain_id`) REFERENCES `civicrm_domain` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci

Error occured at:2008-01-12 13:39:30
Line no.:32
Error Code: 1005 - Can't create table '.\site\civicrm_acl.frm' (errno: 150)

what does it mean ?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: problem with load mysql dump
January 12, 2008, 05:57:02 pm
Please update this post with the following:
* What version of CiviCRM are you using?
* Is this a new install? What file are you trying to load?
* What version of MySQL are you running?

A google search on that error returns the following page:
http://dev.mysql.com/doc/refman/5.0/en/innodb-error-codes.html

with this info:
"Cannot create table. If the error message refers to errno 150, table creation failed because a foreign key constraint was not correctly formed."

... which might be useful after we know the above info.
Protect your investment in CiviCRM by  becoming a Member!

Wonder95

  • Guest
Re: problem with load mysql dump
January 12, 2008, 08:53:32 pm
I'm getting the exact same error trying to move my database to a web server from my local machine.  In my case, I created a dump from MySQL on my machine (4.1.22) and got this error when I tried to import to data to MySQL on the server (5.0.45).  If I remove the lines for the same table as above, I get it on the next table, too.  This same SQL file has worked fine on other installations.

I'm using version 1.9 of CiviCRM.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: problem with load mysql dump
January 13, 2008, 08:46:31 am
Not sure why a dump from one MySQL server should have problems loading on another - altho it's probably related to the different versions. You could try disabling the foreign key checks while the data is loading by adding this to top of dump file:

SET FOREIGN_KEY_CHECKS=0;

... and then this to end of file:

SET FOREIGN_KEY_CHECKS=1;
Protect your investment in CiviCRM by  becoming a Member!

vrazbros

  • Guest
Re: problem with load mysql dump
January 14, 2008, 02:14:40 am
Please update this post with the following:
* What version of CiviCRM are you using?
1.9

* Is this a new install? What file are you trying to load?
I's dump from my site in localhost. Everything was ok until I decided to load old version of my database. I drop my database and try
load database from backup and now I am in trouble.   

* What version of MySQL are you running?
5.0.45

A google search on that error returns the following page:
http://dev.mysql.com/doc/refman/5.0/en/innodb-error-codes.html

with this info:
"Cannot create table. If the error message refers to errno 150, table creation failed because a foreign key constraint was not correctly formed."

  • I've read all the threads but still found no solution. Must of the topics about mysql 4.1 and index, syntax etc.  I don't have this problem because my version of mysql is 5.
  • And I thing index, data, syntax of database is correct, because until I drop my database it works well.


Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: problem with load mysql dump
January 14, 2008, 01:05:58 pm
Did u try adding the SET FOREIGN_KEY_CHECKS statements?

If you tried that, and you're still getting the error, you'll probably need to get help by searching or asking about this on a MySQL forum / knowledgebase - as the problem seems specific to MySQL (you used MySQL to do the dump, and you're using it to load to your other DB etc.).
Protect your investment in CiviCRM by  becoming a Member!

vrazbros

  • Guest
Re: problem with load mysql dump
January 15, 2008, 04:23:27 am
I tried that and it's worked but it's strange.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • problem with load mysql dump

This forum was archived on 2017-11-26.