升级phpStudy中的MySQL
1.下载MySQL最新压缩版.网址如下: https://dev.mysql.com/downloads/mysql/ ,拉到页面最底部,根据需要,选择你需要的组合,就可以拿到最新版的win下面的64位mysql压缩版了。
2. 备份当前MySQL.
[*]停止phpStudy的服务
[*]退出phpStudy
[*]重命名phpStudy下的MySQL文件夹为MySQL.old即可,默认位置为C:\phpStudy\PHPTutorial\MySQL
3. 解压缩最新版mysql
把下载的mysql压缩版,解压到phpstudy下面的mysql目录,默认位置为C:\phpStudy\PHPTutorial\MySQL。
4. 添加MySQL路径到环境变量
5. 配置my.ini
6. 添加skip-grant-tables到my.ini的mysqld,省略密码登陆
7. 启动MySQL
[*]使用管理员身份启动cmd, 输入net start mysql启动MySQL
[*]mysql -uroot 连接到MySQL
8. 在MySQL下运行下列命令
use mysql; # use mysql table
update user set authentication_string=PASSWORD("root") where User='root'; # update password to root
update user set plugin="mysql_native_password" where User='root'; # set password resolving to default mechanism for root user
flush privileges;
quit;
9. 在my.ini中注释掉skip-grant-tables,重启mysql服务
10. 重新连接MySQL,用root/root登陆
页:
[1]