sslug-teknik team mailing list archive
-
sslug-teknik team
-
Mailing list archive
-
Message #101580
Opretelse af MySQL databaser og brugere af disse i BASH
Jeg får følgende fejl
+ mysql -uroot -p""dummy""
ERROR at line 1: Unknown command '\''.
ved
mysql -uroot -p${ROOTPASSWD} << EOT
create user \'$USRNME\' identified by \'${DBPASSWD}\';
grant all privileges on \'$UNDERSCORENAME\'.* to \'$USRNME\'@\'localhost\';
exit;
EOT
og længre nede
+ mysqladmin create test_tj_Juac_dk -utj -pu1PDgtO7Cw/kQ
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'tj'@'localhost' (using password: YES)'
ved
DBPASSWD_TMP=`cat "/home/${USRNME}/PUBLIC_HTML/DB_USER_PASSWD.txt"`
echo "${DBPASSWD_TMP}"
mysqladmin create ${UNDERSCORENAME} -u${USRNME} -p${DBPASSWD_TMP}
Hjælp ønskes :)
Thomas :)
Follow ups