赞
踩
4.修改配置文件
(创建一个ini文件放在解压后的目录下)
内容如下
1.用管理员模式下输入:
mysqld --initialize --console
C:\WINDOWS\system32>mysqld --initialize --console
2024-03-09T07:22:34.244482Z 0 [System] [MY-015017] [Server] MySQL Server Initialization - start.
2024-03-09T07:22:34.287143Z 0 [System] [MY-013169] [Server] F:\mysql-8.3.0-winx64\bin\mysqld.exe (mysqld 8.3.0) initializing of server in progress as process 95688
2024-03-09T07:22:34.336082Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-03-09T07:22:44.031702Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2024-03-09T07:23:07.425080Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: g/6&E9fG9gM8
2024-03-09T07:23:51.837017Z 0 [System] [MY-015018] [Server] MySQL Server Initialization - end.
安装mysqld:mysqld --install
初始化:mysqld --initialize --console
启动和修改密码:
net start mysql
登录:
mysql -u root -p <密码是初始化给的 g/6&E9fG9gM8>
改密码:
方法1.ALTER USER USER() IDENTIFIED BY ‘123123’;123123是修改后的密码
方法2:SET PASSWORD FOR ‘username’@‘localhost’ = ‘new_password’;
退出mysql
关闭服务:net stop mysql
输入 sc query mysql 查看名为mysql的服务
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。