1
sarahmx
Changing database table prefix ?
  • 2009/12/18 0:38

  • sarahmx

  • Quite a regular

  • Posts: 381

  • Since: 2007/10/28


i have been asked to upgrade this XOOPS site of my friend

she is using 2018 and i have successfuly upgrade it to 2.42...fuhh..

that is quite easy



right now i want to change the table prefix of the database..

the prefix is too simple and i thnk its too risky

how do i do this in phpmyadmin? without losing anything ? will it affect the XOOPS site ?




2
Burning
Re: Changing database table prefix ?
  • 2009/12/18 0:43

  • Burning

  • Theme Designer

  • Posts: 1163

  • Since: 2006/8/22


hi' again

I believe this feature is available in Protector.

But you could also make it quickly by a simple find / replace with any editor (eg Notepad++).

There is no danger if you save your database and do your modification on a copy

3
sarahmx
Re: Changing database table prefix ?
  • 2009/12/18 0:57

  • sarahmx

  • Quite a regular

  • Posts: 381

  • Since: 2007/10/28


thanks again

4
sarahmx
Re: Changing database table prefix ?
  • 2009/12/18 3:14

  • sarahmx

  • Quite a regular

  • Posts: 381

  • Since: 2007/10/28


ok im bit confused... i tried this

1. i went to protector prefix manager

2. Click the copy button ..a new prefix is generated...below the original prefix

3. define('XOOPS_DB_PREFIX', 'newprefix'); in mainfile.php

when i check in phpmyadmin..still same old prefix..

does it work like that ..prefix change only in protector and XOOPS but not in the database itself ?


5
Burning
Re: Changing database table prefix ?
  • 2009/12/18 3:30

  • Burning

  • Theme Designer

  • Posts: 1163

  • Since: 2006/8/22


hi'

There are two steps :

1. enter a new prefix in first field (near Copy button). I choose Alligator427, old one was IlikeSushi43 and I click on copy

> what happens now ? I get 1 database but inside all tables are duplicated. Instead of having 50 tables, I get now 100 !


2. Before you can delete your old tables (button Delete is not available yet) you have to modify mainfile.php.

> what happens after mainfile.php modification ? Now, tables used are Alligator427_ and IlikeSushi43_ are not.

> go back to protector, delete your old tables

6
sarahmx
Re: Changing database table prefix ?
  • 2009/12/18 3:46

  • sarahmx

  • Quite a regular

  • Posts: 381

  • Since: 2007/10/28


ok now it works...

there should be clear instruction in the prefix manager page


TQ...Burning

Login

Who's Online

255 user(s) are online (133 user(s) are browsing Support Forums)


Members: 0


Guests: 255


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits