diff options
Diffstat (limited to 'files/setmysqlpass.sh')
-rw-r--r-- | files/setmysqlpass.sh | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/files/setmysqlpass.sh b/files/setmysqlpass.sh deleted file mode 100644 index 586775e..0000000 --- a/files/setmysqlpass.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -# -# Set MySQL password. -# - -CONF="/root/.my.cnf" - -# Check config file -if [ ! -e "$CONF" ]; then - echo "File not found: $CONF" - exit 1 -fi - -# Get password from configuration -passwd="`grep ^'password='` $CONF | cut -d '=' -f 2" - -# Set the password -echo "USE mysql; UPDATE user SET Password=PASSWORD('$passwd') WHERE User='root' AND Host='localhost';" | /usr/bin/mysql -u root |