How to Fix MySQL Error – #1089 – Incorrect prefix key or the storage engine doesn’t support unique prefix keys

Today in this article we will discuss one of the most common errors of MySQL that you may face while creating tables or importing the DataBase to the new server and that is #1089 – Incorrect prefix key; the used key part isn’t a string, the used length is longer than the key part, or the storage engine doesn’t support unique prefix keys.  This occurs due to the syntax error in Create query of Database Table. If you run the below query, you may face the above error and the query will stop working and will not create a Database Table.

And, If you run the below query, you will not face any error and query will work and create …

Read More
How To Fix Laravel SQLSTATE[42000]: Syntax Error Or Access Violation 1071 Specified key was too long

How To Fix Laravel SQLSTATE[42000]: Syntax Error Or Access Violation 1071 Specified key was too long

Today we will discuss the most common error of Laravel 5.4+ that is “Syntax Error Or Access Violation 1071 Specified key was too long”. Before moving ahead we should know the main root cause of this error. Laravel 5.4+ has made changes to the database’s default character set. Now, the updated character set is utf8mb4, which supports the emojis. Now, with this character set, you can store emojis in database table easily. If your web application/website is running on MySQL v7 or above then you do not need to do anything. Otherwise, you may face the following error while running the database migration command. Illuminate\Database\QueryException: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes …

Read More
phpMyAdmin

500 error on phpMyAdmin export on /phpmyadmin/export.php

phpMyAdmin is a free software tool written in PHP, intended to handle the administration of MySQL over the Web. But when you use phpMyAdmin with PHP7 then you can not export the tables/database easily. While exporting tables/database, you will face 500 error on phpMyAdmin on /phpmyadmin/export.php file. Fatal error: Cannot ‘break’ 2 levels in ../phpmyadmin/export.php on line 864 If you are familiar with Linux command/server handling then you can do this very easily. Otherwise please contact the server team and explain to them the error. Don’t worry, this is a code mistake from the phpMyAdmin team. You are into one loop and not two nested loops. That’s why you can’t break 2 (because 2 denotes that you’re inside a nested loop). Most …

Read More