cebel / pyctd

PyCTD is a Python software package to query and analyse data from the CTD database
Apache License 2.0
11 stars 4 forks source link

MySQL database setup instructions in README #24

Open g-simmons opened 5 years ago

g-simmons commented 5 years ago

FYI setting up the database using the commands in the README threw an error about incorrect syntax near IDENTIFIED BY. As a result pyctd.update() asked for connection string. SQL statements in the README:

CREATE DATABASE pyctd CHARACTER SET utf8 COLLATE utf8_general_ci;
GRANT ALL PRIVILEGES ON pyctd.* TO 'pyctd_user'@'%' IDENTIFIED BY 'pyctd_passwd';
FLUSH PRIVILEGES;

Some googling indicates creating users via GRANT is deprecated behavior.

After using

CREATE DATABASE pyctd CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER 'pyctd_user'@'%' IDENTIFIED BY 'pyctd_passwd';
GRANT ALL PRIVILEGES ON pyctd.* TO 'pyctd_user'@'%';
FLUSH PRIVILEGES;

pyctd.update() looks like it's working as expected.