blue-jay / blueprint

Blueprint for your next web application in Go.
https://blue-jay.github.io/
MIT License
481 stars 77 forks source link

BluePrint not authenticating logins, Latest MySQL installed #33

Closed ghost closed 7 years ago

ghost commented 8 years ago

I was uable to get BluePrint to work on the login/auth using the latest MySQL download from oracle, new install. Not sure if it has anything to do with but the sql script to create the DB seems to not like the null default values for timestamps so I had to change those to 0 to get the script to run. I can create a user and verify the user exists in the user table in mysql but re-entering the login info does not work.

-FYI I was able to get mywebapp to work on the same system so not sure what is different between the two.

josephspurrier commented 8 years ago

What OS are you on?

josephspurrier commented 8 years ago

I just tested with MySQL 5.7.13 x64 on Windows 10 and it worked fine. I used HeidiSQL to apply the SQL from database/migration/20160630_020000_a.up.sql and the authentication piece works. Are you accessing via http://localhost?

ghost commented 8 years ago

8.1 Pro I believe. I will check on 10 ent then. I think I was using 127.0.0.1 IP - I will have to go back and check now. (may be a week I'm out on vacay)

ghost commented 8 years ago

yes 127.0.0.1 - Also I notice that a fresh install of Mysql doesnt accept the a.up script, due to default values being null for deleted_at and other timestamps. I had to zero those out to get the script to run so I wonder if that could be a part of of the problem?

josephspurrier commented 8 years ago

Ah, interesting. It looks like MySQL < 5.6.6 sets timestamp as NOT NULL by default. I updated the 'up' script to explicitly set them to accept NULL. Can you try now?

https://github.com/blue-jay/blueprint/commit/8f55ee349ba9335a2aefc96c9e1789ea5e76863c

josephspurrier commented 8 years ago

And that's fine about vacation, no rush! Happy 4th!

josephspurrier commented 8 years ago

I just tested with the latest versions of MySQL 5.6 and 5.7 (on Ubuntu and the Linux AMI). The latest instructions are here: https://github.com/blue-jay/blueprint/wiki

josephspurrier commented 7 years ago

@zenthunder Have you been able to test the script?

josephspurrier commented 7 years ago

Closing. Please reopen if you're still having an issue.