Open 4001982248998 opened 6 years ago
I found out that since mysql 5.7, the row user.password
has been renamed to user.authentication_string
, so the script must be updated accordingly.
I am not good at this. So the syntax to create SQL users has been quite overhauled.
Would this be better?
--- etc/createdb 2018-01-19 10:57:14.300834370 +0100
+++ /usr/local/rtg2/etc/createdb 2018-01-19 12:19:38.841813652 +0100
@@ -23,11 +23,8 @@
# Create the necessary SQL in two /tmp files
cat <<EOT >/tmp/mysql.sql
-INSERT INTO user (Host, User, Password) VALUES ('$HOST','$USER',PASSWORD("$RTGPASS"));
-INSERT INTO db (Host, Db, User, Select_priv, Insert_priv, Update_priv, Delete_priv,
-Create_priv, Drop_priv, Grant_priv, References_priv, Index_priv, Alter_priv)
-VALUES ('$HOST','$DATABASE','$USER','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
-FLUSH PRIVILEGES;
+CREATE USER '$USER'@'localhost' IDENTIFIED BY '$RTGPASS';
+GRANT ALL PRIVILEGES ON rtg.* TO '$USER'@'localhost';
EOT
cat <<EOT >/tmp/rtg.sql
Trying to work around #53, I replaced mariadb with mysql 5.7, confronting me with a new problem:
createdb
creates the database, but no tables. This is the command output: