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

updated python-pyserial (2.7 -> 3.4)
author Hans-G?nter Theisgen
date Mon Apr 06 17:31:37 2020 +0100 (2020-04-06)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/mysql/stuff/reset-password.sh	Mon Apr 06 17:31:37 2020 +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