Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

MySQL Error 1067: Invalid default value for

Posted on 2009-05-11
2
Medium Priority
?
1,525 Views
Last Modified: 2013-12-12
Hello.

I have created a backup of a database
(mysqldump -h localhost -u root -p database_name > database_dump.sql)

Then I have updated my system from MySQL 4.0 to 5.0.45. I have created a clean OS install (centos 5.3 and mysql 5.0.45)

Since the old database wasn`t Utf-8 I converted it:
ICONV -f ISO-8859-2 -t UTF-8 database_dump.sql > database_dump_utf.sql

Then I `ve tried to import this dump:
(mysql -u root -p)
(create database database_name)
mysql -h localhost -u root -p database_name < database_dump_utf.sql

... but I get this error:
ERROR 1067 (42000) at line 10: Invalid default value for

For all others databases the procedure worked ok,

Thank you
0
Comment
Question by:SimpleJ
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
Bobaran98 earned 2000 total points
ID: 24357644
Sounds like your error is in the definition of that table.  Step through your CREATE TABLE statement and see if you find any fields with default values that don't make sense.  If nothing jumps out at you, I suggest going line by line... in other words, start by eliminating from your CREATE TABLE statement all fields but the key(s), then run the statement and see if it works.  If so, then drop the table, add back in the next field, and run the CREATE statement again.  In this manner, you should be able to identify the field with the default value it doesn't like.  If the problem isn't obvious then, post that line here and we'll take a look at it.

Hope this helps!
0
 
LVL 1

Author Comment

by:SimpleJ
ID: 24362895
I thought it would be "cleaner" solution to this ;)

Will try and report ....

thank you
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question