Commit 7cc0e121 authored by Andrew Ladlow's avatar Andrew Ladlow
Browse files

mysql: Escape dollar sign for variable

parent 304f382b
......@@ -47,7 +47,7 @@ fi
if grep -qx 'password = ' /etc/mysql/debian.cnf && [ "$(mysql -u root -se "select exists(select user from mysql.user where user = 'admin');")" = "0" ] ; then
echo "I: Adding 'admin'@'localhost' MySQL user"
if [ -e /etc/first-boot.d/.mysql.hash ]; then
mysql -u root -e "grant all privileges on *.* to 'admin'@'localhost' identified by password '*$(cat /etc/first-boot.d/.mysql.hash)' with grant option;"
mysql -u root -e "grant all privileges on *.* to 'admin'@'localhost' identified by password '*\$(cat /etc/first-boot.d/.mysql.hash)' with grant option;"
else
read -p "Enter a password for the admin@localhost MySQL user (To be used with phpMyAdmin): " password
mysql -u root -e "grant all privileges on *.* to 'admin'@'localhost' identified by '$password' with grant option;"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment