一、从官网下载


二、安装MySQL
用管理员身份打开Windows PowerShell
进入MySQL文件夹
e:
cd mysql
cd bin
然后输入
.mysqld --initialize --console

root@localhost: qx;MNy4:Q(k)
qx;MNy4:Q(k)为root初始密码
三、将MySQL设置为Windows服务
.mysqld -install

四、启动MySQL服务
net start mysql

五、登录MySQL
.mysql -u root -p

六、修改root初始密码
alter user 'root'@'localhost' identified by '想要设置的密码';
commit;
六、设置MySQL远程登陆
#创建用户
create user '用户名'@'%' identified by '密码';
#设置远程登陆
ALTER USER '用户名'@'%' IDENTIFIED WITH mysql_native_password BY '密码';
微信扫描下方的二维码阅读本文
本作品采用知识共享署名-相同方式共享 4.0 国际许可协议进行许可。
暂无评论
要发表评论,您必须先 登录