<![CDATA[ How to rename table names after installation - My Forums]]> https://forums.modx.com/thread/?thread=19750 <![CDATA[Re: How to rename table names after installation]]> https://forums.modx.com/thread/19750/how-to-rename-table-names-after-installation#dis-post-472267 ballyjames21 Jul 19, 2013, 08:33 AM https://forums.modx.com/thread/19750/how-to-rename-table-names-after-installation#dis-post-472267 <![CDATA[Re: How to rename table names after installation]]> https://forums.modx.com/thread/19750/how-to-rename-table-names-after-installation#dis-post-109980 I searched for a long time ... And find here the answer in 5 minutes!]]> Robot Menager Dec 02, 2010, 03:28 AM https://forums.modx.com/thread/19750/how-to-rename-table-names-after-installation#dis-post-109980 <![CDATA[Re: How to rename table names after installation]]> https://forums.modx.com/thread/19750/how-to-rename-table-names-after-installation#dis-post-109979 i need this information]]> techicore Jul 06, 2010, 07:30 AM https://forums.modx.com/thread/19750/how-to-rename-table-names-after-installation#dis-post-109979 <![CDATA[Re: How to rename table names after installation]]> https://forums.modx.com/thread/19750/how-to-rename-table-names-after-installation#dis-post-109978
RENAME TABLE.. not just RENAME]]>
austin Jun 17, 2010, 09:48 AM https://forums.modx.com/thread/19750/how-to-rename-table-names-after-installation#dis-post-109978
<![CDATA[Re: How to rename table names after installation]]> https://forums.modx.com/thread/19750/how-to-rename-table-names-after-installation#dis-post-109977
1. Be careful about listing the "mysql" command the way you did: "mysql -u modx -p modx" note that this would mean that your password was actually preceded by a space. It took me a long time to figure that out. More correct would be "mysql -u modx -pmodx" (note the absence of a space).

2. Yes, use separate databases for separate purposes. The only reason the prefix option is available is for overly-restrictive hosts. It’s just like using separate folders to contain separate files. Organize organize organize...]]>
Everettg_99 Oct 01, 2009, 12:01 AM https://forums.modx.com/thread/19750/how-to-rename-table-names-after-installation#dis-post-109977
<![CDATA[Re: How to rename table names after installation]]> https://forums.modx.com/thread/19750/how-to-rename-table-names-after-installation#dis-post-109976
On reflection having multiple sites share a database is a poor idea unless e.g. you are constrained on the number of databases you can have. When planning database sharing, consider backups and restores.

Ed]]>
ed Oct 03, 2006, 01:21 AM https://forums.modx.com/thread/19750/how-to-rename-table-names-after-installation#dis-post-109976
<![CDATA[Re: How to rename table names after installation]]> https://forums.modx.com/thread/19750/how-to-rename-table-names-after-installation#dis-post-109975 ]]> rethrash Sep 27, 2006, 10:30 AM https://forums.modx.com/thread/19750/how-to-rename-table-names-after-installation#dis-post-109975 <![CDATA[How to rename table names after installation]]> https://forums.modx.com/thread/19750/how-to-rename-table-names-after-installation#dis-post-109974
So my database name was modx and the database owner was modx, using the mysql tee command I listed all the tables to a text file.
mysql -u modx -p modx<br />give password<br />tee tempfile;<br />show tables;<br />\q<br />

I edited tempfile to remove noise characters and create a sql script to rename the tables

my approach was to put a procedure at the top like
foo() {<br />echo RENAME OLDPFX_$1 TO NEWPFX_$1 ’;’<br />}<br />

then globally replace all occurrences of OLDPFX_ to ’foo ’
exit the editor and run the script saving the output
sh tempfile >rename.sql

then use mysql to do the renames
mysql -u modx -p modx<br />\. rename.sql<br />\q<br />

Finally edit manager/includes/config.inc.php to change the table prefix to NEWPFX_

Ed]]>
ed Sep 27, 2006, 06:52 AM https://forums.modx.com/thread/19750/how-to-rename-table-names-after-installation#dis-post-109974