1官网下载安装包并解压
MySQL :: Download MySQL Community Server
2初始化数据库
到bin目录 cmd命令行执行:
mysqld --initialize --console
会随机生成密码
3安装
mysqld -install
启动:
net start mysql
登录数据库:
mysql -u root -p
(输入随机生成的密码)
修改密码:
alter user 'root'@'localhost' identified by 'OyunBack_22322';
提交:
commit;
3允许外部访问
use mysql
select host,user from user;
update user set host='%' where host='localhost';
flush privileges;
quit