Archive for August, 2009

Create foreign key using Phpmyadmin

The innodb storage engine supports foreign keys in Mysql.
To create foreign keys in phpmyadmin :
1. Convert both tables into innodb.
2. View the structure of the table which will have a foreign key. Make the referencing field an INDEX.
3. Now come back to structure view and click Relation view. In the Relation view page the field [...]

Mysql View DEFINER and SQL Security

A little back I tried to backup a database from my webhost and restored it on my localhost mysql. It had a few views. On accessing the views in phpmyadmin mysql gave the error :
#1449 – There is no ‘projects’@’localhost’ registered