Rename a database in phpMyAdmin

I wanted to change a MySQL database name via phpMyAdmin. This is how I did it:

1. Login to phpMyAdmin.
2. Select the database you want to rename.
3. Click on operations tab.
4. In the “rename database to” section, specifiy the new name of the database.
5. You will get a question saying “CREATE DATABASE olddatabasename / DROP DATABASE newdatabasename”. Click ok.
6. Next you will be asked to reload the database. Click yes.

What happens is that you are  creating a new database with a new name, dumping all tables of the old database into the new database and droping the old database. So remember that you will have to check your privileges becuase the old privileges from the old database will not be included.

If you are running a WordPress website you need to modify wp-config.php to start using the new database name.

phpMyAdmin tracking problem

After installing phpMyAdmin 3.3.2deb1 on a Ubuntu 10.04 server with MySQL 5.1.41 I got this error massage when logging on to phpMyAdmin:
The additional features for working with linked tables have been deactivated. To find out why click here.

$cfg[‘Servers’][$i][‘tracking’] … not OK [ Documentation ] Tracking: Disabled

I sloved this by editing /etc/phpmyadmin/config.inc.php and added
$cfg[‘Servers’][$i][‘tracking’] = ‘pma_tracking’;
to the $cfg[‘Servers’][$i] section

Import database larger then 2mb via phpMyAdmin

To import databases larger then 2MB you need to edit /etc/php5/<flavour>/php.ini.

Edit the existing parameters in  php.ini, if they does not exists add them at the end of the file:
post_max_size = 50M
upload_max_filesize = 50M

Restart the webserver. If you are using Apache: sudo /etc/init.d/apache2 restart