phpmyadmin Error: Relational features are disabled - mysql

When I try and create a relationship between two tables I get the error -
"Relational features are disabled".
I've seen that updating phpmyadmin could possibly solve the issue, but I don't have access to do this. I contacted hostgator and they say I'm unable to do this and I would have to upgrade to a different plan in order to upgrade phpmyadmin.
I'm currently running version 4.3.8.
Is there any other fix for this error to allow relationships to be created between tables?

you have to convert your table/db engine to InnoDB with this query :
ALTER TABLE table_name ENGINE=InnoDB;

Related

phpmyadmin only displays internal relation in relational view

I am trying to setup foreign key for my mysql database using phpmyadmin.
But phpmyadmin only displays internal relation in 'relational view'. Note I have already made sure of following steps.
Setup phpmyadmin database (create_table.sql and config stuff)
Made sure all tables in my database using InnoDb
Made sure my intended foreign keys/reference Keyes are indexed.
After all these steps I can only see internal relations in my relational view.
Am I missing something?
This is not actually a solution, but since I cannot comment on posts yet, I'll add a few comments that might help.
I've faced this same issue and the critical parameters seem to be the following:
Case insensitive operating system (in my case windows)
Mixed-case table names (e.g. "TableName")
I've been using Mixed-case table names successfully in Linux, but in Windows something seems to go really wrong with phpMyAdmin.
I bet your table names are mixed-case. Try creating a test table yourself, with a fully lowercase name, and check if you see the "Foreign Key Relations" options of phpMyAdmin.
If you do, then we've found the source of the problem and we're just left with finding a solution or workaround for it :)
ps: More on case-sensitivity and mysql, without any hints about phpMyAdmins view on all of this, can be found here:
http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html
This IS the solution. Renaming table name 'myTable' to 'my_table' solves the problem.
If you have different storage engines on the tables in your database, this would be the case. The only storage engine I know to support foreign keys is InnoDB. MyISAM and the rest don't seem to work.
Change your Storage Engine to: innoDB and then click save.

MySQL Workbench - Fix Index Names Warning

I have a new client that is running a Symfony application with 170 or so MySQL tables. He recently updated his MySQL Workbench to the latest revision and is now getting a warning pop-up when he launched the application
FIX INDEX NAMES
Index names identical to FK names were found in the model, which is not allowed for MySQL5.5 and later. Would you like to rename the indexes?
I am not a DBA but I understand that the index and primary key names are clashing. What are the implications of renaming these indexes vs. just ignoring?
The Symfony app he is running uses the Doctrine ORM, would any queries or the model need to be updated should the indexes be renamed?
Using the InnoDB engine
Thanks
MySQL Workbench checks at opening a model if there are any duplicate index names and offers to rename them to be unique. Letting it doing this has not bad side effect. In fact it is even necessary to be able to apply the model to a server. Otherwise the server will refuse to create tables that contain an index with a name that was already taken.
So in short: it's a good idea to let Workbench fix this bug (since duplicate key names are nothing but a bug).

MySQL table collation suddenly changed to "in use"

I went to connect to my website via firefox earlier this afternoon and I got an error message reading "Unknown storage engine 'InnoDB'." This is particularly weird because I haven't touched the DB at all during the past few days and my site was working just fine up until a few hours ago. When I went to phpmyadmin, I noticed that some of the tables that had the collations utff8_general_ci have been changed to "in_use" and their engines have been changed from MyISAM to nothing... the engine type is just left blank in phpmyadmin. I'm kind of new to the more intricate aspects of mysql and don't know what's going on. Could someone offer some insight that could possibly lead me in the right direction?
Thanks,
Lance
Try the following:
REPAIR TABLE `table_name`
This may not be a table, but a view that references another table/view that doesn't exist anymore. If this is the case, when you click on the table name, then an error will appear:
1356 - View 'PervAtOtherData' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
To view what the view is calling use this SQL:
SHOW CREATE VIEW `PervAtOtherData`;
Or, to delete the view:
DROP VIEW `PervAtOtherData`;
If on windows, do system restore. I had the same problem on 37 tables. It worked for me. If hosted replace the database tables with the ones you have on your computer

Mysql workbench not showing realtions after reverse engineering database

I'm using MySQL workbench 5.2.35 CE to reverse a Mysql Database and show the diagram of tables with their relationships.
I am able to get every table and its fields but the relations between them is not shown. Why is that? Is there any way it can be fixed?
Most often, the relations between tables are not stored in the DB. How to combine two tables is entirely up to the SQL query and because there are near endless possibilities to name your columns this is not easy to guess. Try to find some SELECT statements or use brute force to find out wich columns match.
If you are using MyISAM as the database engine, your database is not fully relational. Make your database fully relational by using InnoDB engine. Then you will be able to see the relations when you do reverse engineering. But please note that each has pros and cons of its own. Google MyISAM vs InnoDB to find out more about the differences.
I have tested mysql-workbench for both 5.2 and 6.0 latest version. My database got foreign key constraints defined clearly. My database is using mysql-native SQL. But the relationships are shown as line between tables. I have created another test database with only two tables. In this case the InoDb was used as engine. The foreign key constrain clearly defined. Still it only generate two lonely table object in the ER diagram after going through the "reverse engineering" module.
While using another commercial software, I was able to generate the 'lines' between the Entities.
My question is, is this a problem of workbench itself, or some error on my part. My database server is the latest stable version 5.6.12. If I can get an answer, this will be good for everyone. You don't have to waste time trying to get an ER-diagram with this piece of software.

MySQL "Error 1005" when adding tables

I've recently been working with a MySQL database, and using MySQL workbench to design the Database.
When I use the export to SQL function, so I can actually get the layout in to the Database, I get:
"Error 1005: Cannot create table"
This appears to be related to Foreign Keys in the create table statement.
Does anybody have a work around for this that doesn't involve taking the constraints out and putting them back in later? That's a less than ideal solution given the size of the database.
When you get this (and other errors out of the InnoDB engine) issue:
SHOW ENGINE INNODB STATUS;
It will give a more detailed reason why the operation couldn't be completed. Make sure to run that from something that'll allow you to scroll or copy the data, as the response is quite long.
I ran into this situation recently when I attempted (in InnoDB tables) to make a foreign key reference to a column that had a different data type.
MySQL 5.1 Documentation