发布网友 发布时间:2022-04-23 21:34
共2个回答
懂视网 时间:2022-05-01 20:03
off echo 停止服务 net stop mysql echo 删除服务 sc delete mysql echo 安装mysql... cd /d %~dp0in mysqld.exe -install ping 127.1 -n 1 >nul ping 127.1 -n 1 >nul echo 初始化mysql... mysqld.exe --initialize EXIT@echo off echo 停止服务 taskkill /f /im mysqld.exe taskkill /f /im mysql.exe net stop mysql >nul echo 删除服务 sc delete mysql echo 卸载mysql cd /d %~dp0in ping 127.1 -n 1 >nul mysqld.exe -remove rd /s /q %~dp0data
:: @echo off @title mysql密码重置为%pwd% echo 1.停止mysql服务 set pwd=root taskkill /f /im mysqld.exe taskkill /f /im mysql.exe net stop mysql >nul echo 2.mysqld 以 skip 权限 表 运行 cd /d %~dp0in start mysqld.exe -nt --skip-grant-tables ping 127.1 -n 1 >nul echo use mysql;>C: mp.txt echo update MySQL.user set authentication_string=password("%pwd%") where user=‘root‘;>>C: mp.txt echo flush privileges; >>C: mp.txt echo exit >>C: mp.txt echo 3.mysql以root无密码登录 4.修改密码 echo "密码 重新设置为%pwd%了 " mysql <C: mp.txt taskkill /f /im mysqld.exe taskkill /f /im mysql.exe net stop mysql >nul net start mysql del C: mp.txt /F ping 127.1 -n 1 >nul echo set password = PASSWORD("%pwd%");>C: mp.sql echo exit >>C: mp.sql echo "输入密码:%pwd%" mysql.exe --connect-expired-password -u root -p"%pwd%"< C: mp.sql ping 127.1 -n 1 >nul del C: mp.sql /F EXIT
MySQL绿色安装
标签:auth mysqld upd mysql password let exe pass bsp
热心网友 时间:2022-05-01 17:11
从MSQL官网下载MySQL服务器安装软件包,下面以mysql-installer-community-5.7.3.0-m13.msi为例。 1、双击进入安装 2、在协议许可(License Agreement)界面,勾寻I accept the license terms”,点击“Next”。