Chinaunix首页 | 论坛 | 博客
  • 博客访问: 608396
  • 博文数量: 142
  • 博客积分: 116
  • 博客等级: 入伍新兵
  • 技术积分: 1445
  • 用 户 组: 普通用户
  • 注册时间: 2010-09-28 08:37
文章分类

全部博文(142)

文章存档

2017年(7)

2016年(57)

2015年(48)

2014年(30)

我的朋友

分类: Mysql/postgreSQL

2015-12-01 13:19:55

下载mysql-5.7.9-winx64.zip

编辑my.ini,设置basedir,datadir

安装为服务
mysqld --install MySQL5.7.9 --defaults-file=E:\my.ini
sc delete MySQL5.7.9

安装初始化数据库(mysql5.7以后默认没有data和script,需要手工安装)
mysqld --defaults-file=E:\my.ini --initialize

初回登录。查看server error log,获取随机密码
mysql -u root -p
Enter password: (enter the random root password here)
ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_password';

GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY "root";
SET PASSWORD FOR 'root'@'%' = PASSWORD('xxxx');
flush privileges;




阅读(1743) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~