- ::forgetMysqlPassword.bat
-
::
-
@echo off
-
set pwd=123456
-
@title mysql密码重置为%pwd%
- echo 1.停止mysql服务
- taskkill /f /im mysqld.exe
- taskkill /f /im mysql.exe
- echo 2.mysqld 以 skip 权限 表 运行
-
start /min mysqld --skip-grant-tables
-
ping 127.1 -n 1 >nul
-
echo use mysql;>tmp.txt
-
echo update user set password=password("%pwd%") where user="root";>>tmp.txt
- echo 3.mysql以root无密码登录 4.修改密码
-
-
mysql -uroot
-
echo "密码 重新设置为%pwd%了 "
-
cmd
-
taskkill /f /im mysqld.exe
-
taskkill /f /im mysql.exe
echo 5.Quit
echo 6.开始mysql服务?????手动把 因为服务名称不一样..net start mysql