Invalid MySQL syntax during post-install database creation
rfilmyer opened this issue · 4 comments
When running vh --install
, I ran into an issue when creating the database. After some bug hunting, I found it was because of this line:
Line 821 in 5ec7c61
The final command in that call, GRANT ALL ON db to user@ip identified by 'password'
, throws a syntax error on MySQL 8. IDENTIFIED BY
is not a part of the GRANT
command. If you remove it it works (eg GRANT ALL ON verlihub TO verlihub@verlihub
executes fine, and IDENTIFIED BY
isn't necessary because you created the user a few lines ago).
alright. so workaround for this would be detection of mysql version and execution of different queries depending on version?
I notice that adding a user with vh -u
similarly seems to fail, and the database looks to have not done the INSERT (since mysql errors get thrown to /dev/null I can't tell what the syntax error might be). What's the latest MySQL version that you guys have been able to get working with this without any problems?
It may be easier for me to get my server running on that, rather than try to get things working with a newer version, short-term.
vh -u
adds user to registered users list in your hub. its unrelated to mysql users.