New password:
Confirm password:
[2023-08-31 22:06:46,571][ERROR]: Uncaught exception
Traceback (most recent call last):
File "/Users/rly/Documents/NWB/spyglass/config/dj_config.py", line 115, in <module>
main(*sys.argv[1:])
File "/Users/rly/Documents/NWB/spyglass/config/dj_config.py", line 109, in main
set_configuration(config)
File "/Users/rly/Documents/NWB/spyglass/config/dj_config.py", line 96, in set_configuration
dj.set_password() # set the users password
File "/Users/rly/mambaforge/envs/spyglass/lib/python3.9/site-packages/datajoint/admin.py", line 19, in set_password
connection.query("SET PASSWORD = PASSWORD('%s')" % new_password)
File "/Users/rly/mambaforge/envs/spyglass/lib/python3.9/site-packages/datajoint/connection.py", line 340, in query
self._execute_query(cursor, query, args, suppress_warnings)
File "/Users/rly/mambaforge/envs/spyglass/lib/python3.9/site-packages/datajoint/connection.py", line 296, in _execute_query
raise translate_query_error(err, query)
datajoint.errors.QuerySyntaxError: ("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 'PASSWORD('******')' at line 1", "SET PASSWORD = PASSWORD('******')")
Bug Report
Description
dj.set_passwordruns the MySQL querySET PASSWORD = PASSWORD('new_password')(source code). Loren Frank's lab recently updated their MySQL database to version 8.0.34, and thePASSWORDfunction in MySQL has been removed in MySQL version 8. As a result,dj.set_passwordno longer works.The new recommended MySQL query is
ALTER USER 'user_name' IDENTIFIED BY 'new_password';Running that works.
See LorenFrankLab/spyglass#639
Reproducibility
Include:
dj.set_password