Closed tjet-lw closed 8 years ago
The same issue
MacBook-Pro-MAC-2:hyvi-cody hmelenok$ node ./node_modules/cody/bin/create_site
Creating project in /Users/hmelenok/WebstormProjects/hyvi-cody/
1) Enter projectname: hyvi
Note: also using hyvi as database name.
Note: by default the mysql root user has no password so you can just hit enter, if you forgot the root password http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html
2) Enter root password for mysql so we can create a new database and user: ******
3) Enter site database user: hyvi
4) Enter site database password: hyvi
5) Enter hostname for site: hyvi.local
6) Enter a location for storing documents:
mkdir /Users/hmelenok/WebstormProjects/hyvi-cody/hyvi/controllers
mkdir /Users/hmelenok/WebstormProjects/hyvi-cody/hyvi/locales
mkdir /Users/hmelenok/WebstormProjects/hyvi-cody/hyvi/static
mkdir /Users/hmelenok/WebstormProjects/hyvi-cody/hyvi/static/css
mkdir /Users/hmelenok/WebstormProjects/hyvi-cody/hyvi/static/images
mkdir /Users/hmelenok/WebstormProjects/hyvi-cody/hyvi/static/js
mkdir /Users/hmelenok/WebstormProjects/hyvi-cody/hyvi/views
/Users/hmelenok/WebstormProjects/hyvi-cody/node_modules/mysql/lib/protocol/Parser.js:78
throw err;
^
Error: ER_INVALID_DEFAULT: Invalid default value for 'created'
at Query.Sequence._packetToError (/Users/hmelenok/WebstormProjects/hyvi-cody/node_modules/mysql/lib/protocol/sequences/Sequence.js:48:14)
at Query.ErrorPacket (/Users/hmelenok/WebstormProjects/hyvi-cody/node_modules/mysql/lib/protocol/sequences/Query.js:83:18)
at Protocol._parsePacket (/Users/hmelenok/WebstormProjects/hyvi-cody/node_modules/mysql/lib/protocol/Protocol.js:280:23)
at Parser.write (/Users/hmelenok/WebstormProjects/hyvi-cody/node_modules/mysql/lib/protocol/Parser.js:73:12)
at Protocol.write (/Users/hmelenok/WebstormProjects/hyvi-cody/node_modules/mysql/lib/protocol/Protocol.js:39:16)
at Socket.<anonymous> (/Users/hmelenok/WebstormProjects/hyvi-cody/node_modules/mysql/lib/Connection.js:96:28)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:146:16)
at Socket.Readable.push (_stream_readable.js:110:10)
--------------------
at Protocol._enqueue (/Users/hmelenok/WebstormProjects/hyvi-cody/node_modules/mysql/lib/protocol/Protocol.js:141:48)
at Connection.query (/Users/hmelenok/WebstormProjects/hyvi-cody/node_modules/mysql/lib/Connection.js:201:25)
at /Users/hmelenok/WebstormProjects/hyvi-cody/node_modules/cody/bin/create_site.js:130:27
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:404:3)
Got it to work by changing the default GLOBAL MySQL sql_mode! You need to remove the NO_ZERO_DATE mode using this command
SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'NO_ZERO_DATE',''));
Cheers!
That's great news @cotlod! Can you tell us which version of MySql you're running please? Thanks.
5.7.9
Cheers!
Seems like they did change some defaults recently (as of 5.7), also 'NO_ZERO_DATE' is now deprecated: http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sql-mode-changes We'll need to change the default value for the rows that use Date.
Thanks a lot for catching this @cotlod!
:+1:
This is 'fixed' in 9ac30d25767a845e16dedb4274f9fbe83e6c29f0 .
Getting this when following the installation guid: mkdir /Users/Micke/Projects/codysites/codyTest/controllers mkdir /Users/Micke/Projects/codysites/codyTest/locales mkdir /Users/Micke/Projects/codysites/codyTest/static mkdir /Users/Micke/Projects/codysites/codyTest/static/css mkdir /Users/Micke/Projects/codysites/codyTest/static/images mkdir /Users/Micke/Projects/codysites/codyTest/static/js mkdir /Users/Micke/Projects/codysites/codyTest/views /Users/Micke/Projects/codysites/node_modules/cody/node_modules/mysql/lib/protocol/Parser.js:82 throw err; ^ Error: ER_INVALID_DEFAULT: Invalid default value for 'created' at Query.Sequence._packetToError (/Users/Micke/Projects/codysites/node_modules/cody/node_modules/mysql/lib/protocol/sequences/Sequence.js:48:14) at Query.ErrorPacket (/Users/Micke/Projects/codysites/node_modules/cody/node_modules/mysql/lib/protocol/sequences/Query.js:83:18) at Protocol._parsePacket (/Users/Micke/Projects/codysites/node_modules/cody/node_modules/mysql/lib/protocol/Protocol.js:274:23) at Parser.write (/Users/Micke/Projects/codysites/node_modules/cody/node_modules/mysql/lib/protocol/Parser.js:77:12) at Protocol.write (/Users/Micke/Projects/codysites/node_modules/cody/node_modules/mysql/lib/protocol/Protocol.js:39:16) at Socket. (/Users/Micke/Projects/codysites/node_modules/cody/node_modules/mysql/lib/Connection.js:96:28)
at Socket.emit (events.js:107:17)
at readableAddChunk (_stream_readable.js:163:16)
at Socket.Readable.push (_stream_readable.js:126:10)
at TCP.onread (net.js:538:20)