MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old July 18th, 2000, 08:38 AM
mistcat mistcat is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: Washington, DC
Posts: 12 mistcat User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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


Reply With Quote
  #2  
Old July 18th, 2000, 11:46 AM
Anti Anti is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 32 Anti User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
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)
)

Reply With Quote
  #3  
Old July 18th, 2000, 01:00 PM
mistcat mistcat is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: Washington, DC
Posts: 12 mistcat User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks! That did the trick. (and made me smack my forehead) Gotta love devshed. =)


Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > HELP! Specified key was too long. Max key length is 256


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway