0

I am restoring a copy of my wordpress site so I went into phpMyAdmin and clicked import and then import my SQL file. After a minute or so of loading I get a notification:

"MySQL said: #1071 - Specified key was too long; max key length is 1000 bytes"

What can I do to fix this? I'm not sure if this helps but I accessed phpMyAdmin through my GoDaddy account.

  • you need the same database as you made the backup – nbk Jul 27 '23 at 13:27
  • Already solved here with a nice explanation: https://stackoverflow.com/questions/1814532/mysql-error-1071-specified-key-was-too-long-max-key-length-is-767-bytes – Kajal Pasha Jul 27 '23 at 14:24
  • Can you at least identify the table on which this is happening? Then show us the `CREATE TABLE ....` for the table and some examples of or even the actual line where the issue is occuring – RiggsFolly Jul 27 '23 at 15:55

2 Answers2

1

Try This

Open the SQL file with a text editor. Find and replace all occurrences of "utf8" with "utf8mb4" as this character set allows longer key lengths. Save the changes and then import the modified SQL file back into phpMyAdmin.

This might Help You.

Shyam
  • 519
  • 2
  • 10
0

As nbk said, make sure that you are importing the sql into the same version of wordpress. There may be differences in the column length of the database columns between different wordpress releases.

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149