狂神 MySQL
https://www.bilibili.com/video/BV1NJ411J79W?p=3
- 解压
- 选择PATH,在其后面添加:mysql安装文件下的bin文件路径
- 新建mysql配置文件ini
[mysqld]
basedir=C:\Program Files\MySQL\MySQL Server 5.7
datadir=C:\Program Files\MySQL\MySQL Server 5.7\data
port = 3306
#skip-grant-tables
- 启动管理员模式下的CMD,运行所有的命令
- 安装mysql服务
- 初始化数据库文件
mysqld --initialize-insecure --user=mysql
- 再次启动mysql,mysql -u root -p进去修改密码
update mysql.user set authentication_string=password(‘1234’) where user=‘root’ and Host = ‘localhost’;
flush privileges (刷新权限)
- 修改my.ini 文件 删除最后一句 skip…tables
net stop mysql
net start mysql
- 重启mysql即可正常运行
- 注意 mysql的所有语句需要使用分号结尾;