This has something to do with the phpMyAdmin settings. For linking tables in the phpMyAdmin environment, you will need a database called 'phpmyadmin' and install the phpmyadmin tables. The tables will only be linked within phpMyAdmin. The link information will be stored in the phpmyadmin database.
1. In Finder, go to /Applications/XAMPP/xamppfiles/phpmyadmin/
2. Copy the file config.inc.php to your desktop.
3. Open the copied file in a text editor (Dreamweaver for example).
4. Look for the following phrase:
- Code: Select all
$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
and fill in a couple of characters.
You will need a database called 'phpmyadmin' with the right tables.
5. In phpmyadmin, create a database called 'phpmyadmin'.
6. Click on the 'import'-tab.
7. Click on the 'browse'-button in order to select a file from the filesystem.
8. Look for create_tables.sql in /Applications/XAMPP/xamppfiles/phpmyadmin/scripts/ and select it.
9. Click on the start button. The needed tables will now be imported.
Now you need to activate the phpmyadmin settings in order to work with linking tables.
10. Go back to the config.inc.php-file on your desktop.
11. Uncomment the following lines (or add them if they don't exists in the file)
- Code: Select all
/* Advanced phpMyAdmin features */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
$cfg['Servers'][$i]['relation'] = 'pma_relation';
$cfg['Servers'][$i]['table_info'] = 'pma_table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma_column_info';
$cfg['Servers'][$i]['history'] = 'pma_history';
12. Save the file.
13. Move the file on your desktop back to the folder /Applications/XAMPP/xamppfiles/phpmyadmin/. You will get a warning that the content of that folder can not be changed, but an administrator may. So click on the button 'identity control' (don't know what the button is exact called) and fill in the password of your Mac account. If that doesn't work, try to delete the old config.inc.php-file first.
Now you have the possibility to link tables in phpMyAdmin. When working with databases in phpmyadmin, you will now see a tab 'designer'. Please note that how the tables are linked is only visible in your phpmyadmin-installation. When you export the database and you import it into another webserver then the linking information will be gone (but you could export a part of the phpmyadmin database).
I know that there were other options for linking tables (within MySQL), but I didn't try that yet. It had something to with the InnoDB storage, I think.