Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

shariff's avatar
Level 51

unable to import MySQL database in server(Shared Hosting)

hi In local it is working fine. While importing the MySQL database in the server, it is importing all the tables not importing the primary and foreign key relationships. In between, I am getting an error like this

#1071 - Specified key was too long; max key length is 767 bytes

0 likes
9 replies
shariff's avatar
Level 51

Ya I have seen so many discussion but unable to solve

Sinnbeck's avatar

Any chance that you can use a newer version of mysql on your shared server?

shariff's avatar
Level 51

No, last week I have hosted then it was working. Then how to check the version of mysql?

shariff's avatar
Level 51

@sinnbeck yes you are right there is a big difference in version

in local I am using 10.4.6 and in the server, I am using 5.5.61-38.13

how to solve this problem?

Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

Try asking your provider if its possible to upgrade to 5.7

Please or to participate in this conversation.