Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Daniel Schroeder13,859 Points
ERROR 1366 When Importing database.sql into MySQL.
Hi all, I attempted to download the project files and import the database.sql into my local MySQL server and had an issue that I think all of you will have too if you try the same thing.
Here is the error message: ERROR 1366 (HY000) at line 358: Incorrect integer value: '' for column 'people_id' at row 1
And here is line 358 in database.sql: INSERT INTO
Media_People VALUES (26,'','star');
Notice that the second value is '', and it should be an integer, specifically, 163, the next people_id in the series.
Replace line 358 with this: INSERT INTO
Media_People VALUES (26,163,'star');
And you should be good to go!
Note If you need to delete the partially formed database from MySQL so that you can redo the import with the correct database.sql file, you'll need to use this command (note the use of backticks (
) arounddatabase`, those aren't single quotes!).