Jump to content
X2Community Forums

Recommended Posts

Hello,

 

Would you happen to be installing the application using a database which had already been in use? You'll need to drop those remaining tables before rerunning the installation script to satisfy the existing constraints.

 

Raymond

i have got the same error as Dyno. and i cant get it installed on my server.

 

im useing hostgator. and it keep pop up this when im installing it.

 

Installing X2CRM
  • Completed: set up core database structure
  • Completed: set up role-based access control (RBAC) permissions system
  • Completed: insert time zone data
  • Error installing module "actions". SQL statement "DROP TABLE IF EXISTS x2_actions;" failed;23000,1217,Cannot delete or update a parent row: a foreign key constraint fails
Link to post
Share on other sites

It sounds like there was already an existing installation using that database, can you confirm if this is the case? Assuming that this database already housed an X2CRM installation, you'll need to remove the existing tables in your database before proceeding with the install to avoid that constraint issue. First, list the existing tables in your database, then remove them. You'll want to use SQL similar to the following:

SHOW TABLES;
DROP TABLE x2_calendars;
DROP TABLE x2_locations;
DROP TABLE x2_actions;

If this database is shared with any other applications for some reason, you'll want to exclude those tables of course. Once the tables are removed, re-run the installation script.

Link to post
Share on other sites

It sounds like there was already an existing installation using that database, can you confirm if this is the case? Assuming that this database already housed an X2CRM installation, you'll need to remove the existing tables in your database before proceeding with the install to avoid that constraint issue. First, list the existing tables in your database, then remove them. You'll want to use SQL similar to the following:

SHOW TABLES;
DROP TABLE x2_calendars;
DROP TABLE x2_locations;
DROP TABLE x2_actions;

If this database is shared with any other applications for some reason, you'll want to exclude those tables of course. Once the tables are removed, re-run the installation script.

should i upload all of the x2crm file  or just the x2crm engine folder

Link to post
Share on other sites

It sounds like there was already an existing installation using that database, can you confirm if this is the case? Assuming that this database already housed an X2CRM installation, you'll need to remove the existing tables in your database before proceeding with the install to avoid that constraint issue. First, list the existing tables in your database, then remove them. You'll want to use SQL similar to the following:

SHOW TABLES;
DROP TABLE x2_calendars;
DROP TABLE x2_locations;
DROP TABLE x2_actions;

If this database is shared with any other applications for some reason, you'll want to exclude those tables of course. Once the tables are removed, re-run the installation script.

 

 

Hello Raymond,

 

Now i have a new error surfaced. see detail following.

 

Installing X2CRM
  • Completed: set up core database structure
  • Completed: set up role-based access control (RBAC) permissions system
  • Completed: insert time zone data
  • Error installing module "users". SQL statement "ALTER TABLE `x2_calendar_permissions` ADD CONSTRAI..." failed;HY000,1005,Can't create table 'jackdwq_jjcrm.#sql-11c29_1b7462d' (errno: 150)

 

i know nothing about sql. please advice me what to do.

 

Regards,

Jack

Link to post
Share on other sites

Hello Jack,

 

I suspect that issue is arising due to the default storage engine on your host. It is likely that the default engine is MyISAM, and since the x2_users table doesn't include a specific engine statement, it defaults to MyISAM, then fails when attempting to add the foreign key. Since you're on Hostgator, you probably won't be able to modify your MySQL server config, so it may be best to update the installation SQL to include the db engine. First, drop the tables in the half-constructed database to avoid the previous issue. Then, update the file at x2engine/protected/modules/users/data/install.sql, and add the ENGINE statement after the x2_users table definition:

CREATE TABLE x2_users (
    /* ... */
) ENGINE InnoDB, COLLATE = utf8_general_ci;

Then proceed with the installation.

 

Raymond

Link to post
Share on other sites
  • 3 months later...
  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...