1、将下载的MySQL压缩包解压到指定目录如(D:\program files\mysql),并将指定的数据库配置文件复制到该目录
2、进行MySQL的bin目录
3、管理员打包cmd
4、初始化:mysqld --initialize --console (运行成功扣,记下password is generated for root@localhost:初始密码)
5、安装:mysqld --install
6、启动:net start mysql
7、登录mysql(使用4中的初始密码)
mysql -u root -p
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
8、远程访问:
CREATE USER 'root'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;