Closed DryWood closed 5 years ago
I actually see the problem here: the ON DUPLICATE KEY
references a column called rank
, but rank
is a reserved word in MySQL 8 (specifically, the name of a window function).
Changing this line to explicitly quote the column name in backticks should fix it: https://github.com/calzoneman/sync/blob/08f9feef7479c09e932377b57409ce2e5ce76fe2/src/database/channels.js#L381
Hello,
I have deployed Cytube to a Ubuntu Server 19.04 VM. Using a separate VM (192.x.x.12) that hosts my mysql server 8.0.16. Connection from Cytube VM to SQL VM works as intended for most operations.
All initial tables are generated upon launch and
User generation works as intended.
Server Problem
npm run build-server
to regeneratelib/
fromsrc/
rm -rf node_modules && npm install
to get a fresh install of dependenciesDescription of the Problem
When I try to create a Channel I receive this error :
Console Error :
[ERROR] database: Legacy DB query failed. Query: INSERT INTO 'channel_ranks' VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE rank=?, Substitutions: ["UserName",5,"ChannelName",5], Error: Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'rank=5' at line 1.
In the MySQL Server, the
channel_ranks
table contains no info :On page refresh, you can see that it does create the channel (test2) :
The channel is also created in the Channel Table in MySQL. :
But once you enter the channel. as the creator, my user does not have Channel Admin authority :
System Information