mysql 7下载安装及问题解决

mysql 7安装及问题解决

一、mysql下载

  • 下载地址:https://www.mysql.com/downloads/
  • Community (GPL) Downloads
  • MySQL Community Server (GPL)
  • Windows (x86, 64-bit), ZIP Archive
  • No thanks, just start my download.

二、mysql安装

注: mysql 7默认密码不在为空了,目前不知道默认密码是啥,所以直接重置密码就行了。

  • 在进程中杀死 mysqld进程
  • 执行 mysqld skip-grant-tables (就是在启动mysql时不启动grant-tables,授权表。)
  • 修改root用户密码
update mysql.user set authentication_string=password('123456') where user='root' and Host = 'localhost';

flush privileges;
  • 遇到的特殊情况
    重置完密码,连上mysql之后,在新建数据库的时候出现如下错误:
    ERROR 1820 (HY000): You must SET PASSWORD before executing this statement
    原因可能是上面的update语句执行完毕,没有执行 flush privileges (刷新MySQL的系统权限相关表)
    解决方法:
    SET PASSWORD = PASSWORD('some password')

三、至此mysql 7的安装完成。

posted @ 2016-10-18 16:14  hjzqyx  阅读(933)  评论(0编辑  收藏  举报