|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Hey guys I hope you can help me with this one... I'm trying to create a table from an old msql db dump. I think I've converted all the commands to be mysql compliant but when I try to build my indexes the thing gives me the following error message:
Specified key was too long. Max key length is 256. I hope you guys can help! =) Here is the code I'm using: CREATE TABLE manetwork ( listing INT NOT NULL, name TEXT, email TEXT, city CHAR(50), region CHAR(25) NOT NULL, state CHAR(4) NOT NULL, country CHAR(40), age INT, kstyle CHAR(75) NOT NULL, style CHAR(150) NOT NULL, INDEX manetwork_search ( listing, region, state, kstyle, style ), UNIQUE INDEX manetwork_listing ( listing ) ) g |
|
#2
|
|||
|
|||
|
Your "manetwork_search" index is too big. The "kstyle" and "style" are taking up too much space. Chop 'em off at a certain length, 25 for example...
INDEX manetwork_search ( listing, region, state, kstyle(25), style(25) ) |
|
#3
|
|||
|
|||
|
Thanks! That did the trick. (and made me smack my forehead) Gotta love devshed. =)
|
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > HELP! Specified key was too long. Max key length is 256 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|