#!/bin/bash
echo "请输入要重设的mysql的root帐户的密码:"
read -p "root新密码: " newpwd
echo
mysql -uroot -e ‘
use mysql;
update mysql.user set password=password(‘${newpwd}‘) where user=‘root‘;
flush privileges;
‘
echo "root密码配置完毕,请测试"
未解决::ERROR 1054 (42S22) at line 3: Unknown column ‘localhost‘ in ‘where clause‘
时间: 2024-12-29 16:47:53