To change the database prefix to prevent SQL Injection Attack (if not done during install)
Backup your database and site first.
Method 1 - PHPMyAdmin (inbuilt)
Newer version of PHPMyAdmin have a table prefix changer inbuilt and is now the prefered method.
- Open up your Joomla database in PHPMyAdmin
- Check All tables. If you can see them all exand the number of tables you can see on the page.
- At the bottom, With Selected: , choose Replace table prefix
- It will now ask you for the From prefix which is your current one jos_ , you should fill this in the box. You can also usually see the database prefix in the column on the left. The To prefix should be a random 5 characters using upper case, lower case and numbers (ie TrFgH_).
- Click submit
- Done
Method 2 - Old Text File method
Taken from here
- Make a note of you database prefix either from joomla itself or the configuration.php file. For this example we will assume jos_
- Go to PHPMyAdmin and export your database as a SQL file
- Open database SQL file in a text editor (Notepad++).
- Search and replace (Ctrl+h in Notepad++) jos_ with your new database prefix, it should be a random 5 characters using upper case, lower case and numbers (ie TrFgH_).
- Save the file
- Go in phpMyAdmin
- select your Joomla database and empty it of tables and data (i.e. Truncate)
- import the new SQL database file from above in to your Joomla database
- Via ftp edit your configuration.php to refelct the new table prefix. No other details will need to be changed.
- Done