这里写目录标题
cmd
管理员进入mysql\bin
目录。- 初始化 mysql:
mysqld --initialize
- 安装 mysql 服务:
mysqld --install
- 启动服务:
net start mysql
(初次登陆密码在data
目录.err
文件root@localhost
后, 之后修改密码) - 登录:
mysql -uroot -p[密码]
- 修改加密规则:
alter user 'root'@'localhost' identified by 'password' password expire never
; - 修改密码:
alter user 'root'@'localhost' identified with mysql_native_password by '[密码]'
; - 登出:
exit
- 停止服务:
net stop mysql