search for: mysql_root_password

Displaying 2 results from an estimated 2 matches for "mysql_root_password".

2017 Mar 15
1
Using environment variables in mariadb
...oot password, so I found how to use here doc: mysql -u root -p <<EOF || exit 1 CREATE DATABASE postfix; CREATE USER postfix at localhost IDENTIFIED BY "$Postfix_Database_Password"; GRANT ALL PRIVILEGES ON postfix.* TO postfix at localhost; EOF next refinement is: mysql -u root -p$mysql_root_Password <<EOF || exit 1 CREATE DATABASE postfix; CREATE USER postfix at localhost IDENTIFIED BY "$Postfix_Database_Password"; GRANT ALL PRIVILEGES ON postfix.* TO postfix at localhost; EOF
2017 Mar 14
2
Using environment variables in mariadb
I want to script a rather simple create database operation. Thing is, I have to provide the password for that database. I would like to do this with an environment variable, but the simple approach dose not work: mailpswd=charlie mysql -u root -p CREATE DATABASE mailfix; CREATE USER 'mailfix'@'localhost' IDENTIFIED BY $mailpswd; GRANT ALL PRIVILEGES ON `mailfix` . * TO