MySQL dump plus rename tables

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
macangelo
Posts: 756
Joined: Sat 29. Nov 2003, 14:19
Location: Düsseldorf
Contact:

MySQL dump plus rename tables

Post by macangelo »

Hi

some weeks ago I did 2 pro bono web sites. To save money of the client I put both sites into one phpwcms. Now, since I learned that I can better arange that with "prepend table names" I want to do that bei prepending "et" and "vi".

For this I thought I need to export the MySQL-Database, duplicate it, prepend the table names of one copy with "et" and the tables of the other copy with "vi". Then I would import each copy to the empty database of my new installation and fine.

That's how I thought it out ( as you might have figured out allready you can't call me an MySQL-expert ). But: How do I rename the tables of my copies?

Thanks for any help or better solutions how to do that!

Macangelo
Webdesign from Düsseldorf - made with phpwcms (most of it):
http://eyelikeit.com/index.php?de_beispiele-webdesign
User avatar
Oliver Georgi
Site Admin
Posts: 9889
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Use phpmyadmin - there you can simple change the table names by adding a prefix to each table like 'myprefix_' -> then your renamed phpwcms_article table should be named like: myprefix_phpwcms_article ...and so on.

Then set
$phpwcms["db_prepend"] = "myprefix";

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
macangelo
Posts: 756
Joined: Sat 29. Nov 2003, 14:19
Location: Düsseldorf
Contact:

Post by macangelo »

Hi Oliver - thanks for the hope:

PHPMyAdmin is open. I have 5 Tabs: Struktur, SQL, Export, Search, Query. Where and how do I rename the tables?

Thanks a lot!

Macangelo
Webdesign from Düsseldorf - made with phpwcms (most of it):
http://eyelikeit.com/index.php?de_beispiele-webdesign
macangelo
Posts: 756
Joined: Sat 29. Nov 2003, 14:19
Location: Düsseldorf
Contact:

Post by macangelo »

Found it!
Webdesign from Düsseldorf - made with phpwcms (most of it):
http://eyelikeit.com/index.php?de_beispiele-webdesign
Post Reply