debian-sys-maint-roll-passwd
debian-sys-maint-roll-passwd copied to clipboard
MariaDB Syntax Error
Currently falling in to this error when running the script:
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'USER 'root'@'localhost'
I also seem to get a similar error on our MySQL 5.6.16 installs
ERROR 1064 (42000) at line 1: 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 'IDENTIFIED BY
I think I know the issue, we are on "xenial" but using MySQL 5.6. But the outcome of this case statement means we would have to be using MySQL 5.7 for the syntax to work
-
Code: https://github.com/digitalocean/debian-sys-maint-roll-passwd/blob/master/fix.sh#L87
-
Docs: https://dev.mysql.com/doc/refman/5.7/en/default-privileges.html#idm139777195325744
Adding xenial to case statements fixed it for me, but maybe it should be a case statement based off the MySQL version