changing table prefix

Discussion in 'Databases' started by Lpspider, Dec 10, 2006.

  1. #1
    I need to change the table prefix for all tables in my database... how can I do this quickly without disrupting the site?
     
    Lpspider, Dec 10, 2006 IP
  2. kashem

    kashem Banned

    Messages:
    1,250
    Likes Received:
    76
    Best Answers:
    0
    Trophy Points:
    0
    #2
    So far I could realise the tables are created by some script. You could rename the tables. If the script keep the prefix at somewhere and using it then you will need to find out where it is stored and rename it , otherwise the script will not run
     
    kashem, Dec 11, 2006 IP
  3. it career

    it career Notable Member

    Messages:
    3,562
    Likes Received:
    155
    Best Answers:
    0
    Trophy Points:
    270
    #3
    Please share sample code of your site.
     
    it career, Dec 11, 2006 IP
  4. Lpspider

    Lpspider Well-Known Member

    Messages:
    2,216
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    160
    #4
    It's actually vBulletin.
     
    Lpspider, Dec 11, 2006 IP
  5. adsexper

    adsexper Peon

    Messages:
    19
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    what kind of database do you have? you might have to create new tables and move the rows from the old tables into the new ones.
     
    adsexper, Dec 13, 2006 IP
  6. syntax_error

    syntax_error Peon

    Messages:
    58
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Run the code in sql administration like this will do
    RENAME TABLE member TO vb_member
    RENAME TABLE moderator TO vb_moderator
    repeat for all table in the structure...it will do..
     
    syntax_error, Dec 13, 2006 IP