I need to add table prefix for all the database table.
I know that I can get this option while installing the Magento but I already installed my magento and I don't want to change the database,
I just need to add the prefix for all the tables.
I checked lot for this but I didn't get perfect answer for this.
Can anyone help me to do this,
How can I add prefix to all the tables without any data loss?
Best Answer
The way I know is to use the following command either one by one:
or
as described here
and then edit the
app/etc/local.xml
and find the tag with name<table_prefix>
and update it accordingly<table_prefix><![CDATA[my_prefix_]]></table_prefix>
, and save it.You have to run these queries directly in the database so please please take a backup first or try on staging.