wok diff mysql/stuff/reset-password.sh @ rev 22087

updated urlgrabber again (3.9.1 -> 4.0.0)
author Hans-G?nter Theisgen
date Thu Oct 31 13:11:09 2019 +0100 (2019-10-31)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/mysql/stuff/reset-password.sh	Thu Oct 31 13:11:09 2019 +0100
     1.3 @@ -0,0 +1,12 @@
     1.4 +#!/bin/sh
     1.5 +
     1.6 +[ -z "$1" ] && echo "Usage: $0 <newpassword>" && exit 1
     1.7 +
     1.8 +/etc/init.d/mysql stop
     1.9 +/usr/bin/mysqld_safe --skip-grant-tables &
    1.10 +mysql <<EOT
    1.11 +UPDATE `mysql`.`user` SET `Password` = password('$1') WHERE `User` = "root" AND Host = "localhost";
    1.12 +quit
    1.13 +EOT
    1.14 +mysqladmin shutdown
    1.15 +/etc/init.d/mysql start