Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL administration tool with serious foreign key management [closed]

I have a recurrent problem with phpMyAdmin: its relation view feature allows to create/drop foreign keys, but offers no control over the name of the constraint created.

Basically, it relies on default FK names like UserAddress_ibfk_2.

That becomes tricky when trying to version a database with SQL patches, when we have no control over the names of the constraints. Of course we can write all FK-related queries by hand, but that's like loosing a bit the point of using a tool like PMA.

Are you guys using good alternatives to phpMyAdmin that have a nice FK editor allowing to edit the names of the constraints?

like image 404
BenMorel Avatar asked Dec 13 '11 18:12

BenMorel


People also ask

What tool is used to administrative tasks in MySQL?

MySQL Workbench provides a visual interface to administer your MySQL environment. The available visual tools help configure your MySQL servers, administer users, perform backup and recovery, inspect audit data, and view database health.

How do I disable foreign key checks in MySQL?

You can disable foreign key check in MySQL by setting the system variable foreign_key_checks to 0. However, please note, after you enable foreign key checks, MySQL will not re-validate your existing data that you added after disabling foreign key check. It will only check any new additions/updates to your database.

How can foreign key constraints be prevented?

To disable a foreign key constraint for INSERT and UPDATE statements. In Object Explorer, expand the table with the constraint and then expand the Keys folder. Right-click the constraint and select Modify. In the grid under Table Designer, select Enforce Foreign Key Constraint and select No from the drop-down menu.

Does MySQL support foreign keys?

MySQL supports foreign key references between one column and another within a table. (A column cannot have a foreign key reference to itself.) In these cases, a “child table record” refers to a dependent record within the same table.


2 Answers

You can use:

  • Mysql Workbench

Mysql Workbench

  • Navicat

navicat

  • SQLYog

sqlyog

  • SQL Maestro

SQL Maestro

They are available in different version Windows, Linux or MAC

like image 77
Book Of Zeus Avatar answered Sep 26 '22 00:09

Book Of Zeus


Yes it's called Mysql Workbench

Very handy tool and available in different OS

like image 23
Ibu Avatar answered Sep 26 '22 00:09

Ibu