1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Can't remove server from Expand

Discussion in 'Plesk Expand 2.3 Troubleshooting Issues' started by wsani, Jun 6, 2009.

  1. wsani

    wsani Silver Pleskian

    28
    40%
    Joined:
    Mar 4, 2005
    Messages:
    509
    Likes Received:
    0
    <errtext>Cannot delete or update a parent row: a foreign key constraint fails (`expand/cmail_object`, CONSTRAINT `cmail_object_ibfk_2` FOREIGN KEY (`plesk_server_id`) REFERENCES `plesk_server` (`id`)). Error query: DELETE FROM plesk_server WHERE id = 9</errtext>

    Suggestions?
     
  2. gold

    gold Regular Pleskian

    25
    57%
    Joined:
    Jan 8, 2008
    Messages:
    307
    Likes Received:
    0
    Please run the following commands:
    Code:
    /usr/local/expand/sbin/expandmysql -e 'delete from cmail_activity_log where cmail_activity_log.cmail_attempt_id in (select cmail_attempt.id from cmail_object inner join cmail_attempt on cmail_attempt.object_id = cmail_object.id where cmail_object.plesk_server_id = 9)'
    /usr/local/expand/sbin/expandmysql -e 'delete from cmail_attempt where cmail_attempt.object_id in (select cmail_object.id from cmail_object where cmail_object.plesk_server_id = 9)'
    /usr/local/expand/sbin/expandmysql -e 'delete from cmail_mail_statistics where cmail_mail_statistics.object_id in (select cmail_object.id from cmail_object where cmail_object.plesk_server_id = 9)'
    /usr/local/expand/sbin/expandmysql -e 'delete from cmail_object where cmail_object.plesk_server_id = 9'
    
     
Loading...