SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot wh33t's Avatar
    Join Date
    Aug 2011
    Posts
    155
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    #1025 and PHPMYADMIN

    Hey Guys,

    I'm having troubles deleting a Foreign Key constraint I've set up in PHPMYADMIN. For some reason when I click the "drop" link to remove the index I get this irritatingly common error yet I have no idea how to fix it. I have googled around many solutions seem to suggest that doing a "SHOW ENGINE INNODB STATUS" will help me in some way. However to my knowledge that will only reveal the constraints and indexes and I already know which ones are there, PHPMYADMIN tells me which are there. Not only that, when try "SHOW ENGINE INNODB STATUS" I get an error that tells me I need superuser privledges which I don't think I have access to on my VPS currently.

    If you have any clue about what is going please help. I've attached some images to show you the error.

    droplink.pngfkdroperror.png

  2. #2
    SitePoint Zealot wh33t's Avatar
    Join Date
    Aug 2011
    Posts
    155
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I managed to solve it with more Googling. Apparently PHPMYADMIN will permit you to create a bogus FK.

    This fixed it:


    http://stackoverflow.com/questions/5...e-of-errno-150
    Use SHOW CREATE TABLE categories to show the name of constraint.

    Most probably it will be categories_ibfk_1

    Use the name to drop the foreign key first and the column then:

    ALTER TABLE categories DROP FOREIGN KEY categories_ibfk_1;
    ALTER TABLE categories DROP COLUMN assets_id;


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •