- 注册时间
- 2012-11-28
- 最后登录
- 2021-2-12
- 阅读权限
- 200
- 积分
- 3774
- 精华
- 0
- 帖子
- 116
  
ta_mind | mb_qb7 2013-3-19 01:56 |
---|
classn_01: 366 classn_02 [LV.9]以坛为家II
|
5.初始化、安装、启动
打开以管理员身份运行cmd
初始化
1
mysqld --initialize
安装:
1
mysqld --install
启动:
1
net start MySQL
注意:如果不以管理员身份运行cmd执行以上命令,有可能会遇到一下报错信息
6.修改配置文件
打开 my.ini,找到 [mysqld],在下面添加:
skip-grant-tables
此时使用 root 账号,密码处按回车即可登录
7.登录后执行以下命令修改密码
update mysql.user set authentication_string=password('new_password') where user='root' and Host ='localhost';
执行完成后退出MySQL,注释或者删除掉my.ini中 skip-grant-tables,停止mysql : net stop MySQL,再启动: net start MySQL |
|