MySQL初始化并设置默认密码123456一键操作dos命令
cd C:\mysql-8.0.12-winx64\bin mysqld --initialize-insecure --user=mysql --console mysqld install net start mysql pause echo use mysql;>in.txt echo update user set authentication_string='' where user='root'; >>in.txt echo ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';>>in.txt echo FLUSH PRIVILEGES;>>in.txt mysql -u root <in.txt