MySQL Server 安装

1、安装mysql-5.7.18-winx64.msi;
2、打开cmd,进入C:Program FilesMySQLMySQL Server 5.7in;
3、执行 mysqld –install;

image


4、创建文件夹C:Program FilesMySQLMySQL Server 5.7data

初始化并查看mysql root用户密码 mysqld --initialize --console

image

bKtSB3gICU)? 即是安装时为root用户产生的随机密码;

5、net start mysql;开启mysql服务;


登录mysql

image


6、修改root密码;SET PASSWORD =PASSWORD('123456');

image



7、创建用户

create user 'allen'@'localhost' identified by '123456';

image

8、修改用户权限
GRANT ALL ON *.* TO 'allen'@'localhost';

image

原文地址:https://www.cnblogs.com/feihum/p/11231714.html