windows下mysql安装
windows下mysql安装
下载:
https://dev.mysql.com/downloads/mysql/
安装环境变量
环境变量 -> 系统变量 Path 新建(N)
my.ini文件编写
my.ini文件所在位置:
my.ini文件内容:
1 | [client] |
初始化MySQL
1 | mysqld --initialize --user=mysql --console |
命令执行完毕之后,最后面会有默认密码,等下会用到
1 | mysqld --install |
登录mysql
1 | mysql -u root -p |
接下来会让你输入密码,就把刚刚生成的默认密码复制进去
登录进去后,要设置成你容易记住的密码:
1 | set password='123'; |
Bugs
Client does not support authentication protocol requested by server;
1
2
3use mysql;
alter user 'root'@'localhost' identified with mysql_native_password by '********';
flush privileges;
原文作者: Burgess
原文链接: https://qiyaozu.github.io/2020/03/04/win_mysql/
版权声明: 转载请注明出处(必须保留作者署名及链接)