Home arrow MySQL arrow MySQL Table Prefix Changer Tool in PHP

MySQL Table Prefix Changer Tool in PHP

If you are a web developer, you are undoubtedly aware that there are constant threats to your site. SQL injections are one type of threat that you must be aware of and make every attempt to prevent.

  1. MySQL Table Prefix Changer Tool in PHP
  2. Constructing the tool
  3. Editing your current database tables
  4. Putting the database back together
By: Nilpo
Rating: starstarstarstarstar / 24
January 02, 2008

print this article



In a SQL injection, a malicious user is able to execute queries against your database through form fields on your web site.  In some cases, they are even able to append them as POST data directly in the address bar.

This is especially a risk when you are running publicly available software packages such as phpBB.  Most users do not change the default settings, so once a vulnerability is exposed, malicious users are able to target sites running the software much more effectively.

Iíve used phpBB as an example because it is well-known for its security vulnerabilities.  Sites running phpBB often become the target of SQL injection attacks.  Of the many ways to secure a phpBB installation, one of the most effective is to change the MySQL table prefixes away from the defaults set by the phpBB installer.

This makes it that much harder for malicious users to effectively target your database.  While this in and of itself does not prevent SQL injections or increase your siteís security, it does make these attacks far less effective.

While I designed this tool with this purpose in mind, it doesnít stop there.  Perhaps you are migrating a site from one host to another and you need to change table prefixes as a result.  Or maybe you are restoring data from an old backup into a new installation that uses different settings from the previous.

In any case, changing these prefixes can be a tedious job if you had to do it manually. Even tools like phpMyAdmin donít provide a clean, quick method of doing this. But with a little help from PHP, we are able to create our own tool very quickly.

>>> More MySQL Articles          >>> More By Nilpo

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Oracle Unveils MySQL 5.6
- MySQL Vulnerabilities Threaten Databases
- MySQL Cloud Options Expand with Google Cloud...
- MySQL 5.6 Prepped to Handle Demanding Web Use
- ScaleBase Service Virtualizes MySQL Databases
- Oracle Unveils MySQL Conversion Tools
- Akiban Opens Database Software for MySQL Use...
- Oracle Fixes MySQL Bug
- MySQL Databases Vulnerable to Password Hack
- MySQL: Overview of the ALTER TABLE Statement
- MySQL: How to Use the GRANT Statement
- MySQL: Creating, Listing, and Removing Datab...
- MySQL: Create, Show, and Describe Database T...
- MySQL Data and Table Types
- McAfee Releases Audit Plugin for MySQL Users

Developer Shed Affiliates


Dev Shed Tutorial Topics: