zip解压mysql安装图解_Mysql安装教程-zip格式压缩包

1.配置环境变量:

我的电脑->属性->高级->环境变量

选择PATH,在其后面添加: 你的mysql bin文件夹的路径 :D:\Program             Files\JavaTool\MySQL\mysql-5.6.39-winx64\binf576dc9a9010e573fc406d6420f1c885.png配置环境变量

2.在MySQL安装路径下建立一个my.ini文件

ee2adcc9bb8f521146f3caf2a9120653.png创建位置

在其中修改或添加配置 :[mysqld]

basedir=F:\JAVAWord\mysql-5.7.19-winx64\

datadir=F:\JAVAWord\mysql-5.7.19-winx64\data

# 设置3306端口

port = 3306

skip-grant-tables

3.以管理员身份运行cmd(一定要用管理员身份运行,不然权限不够),

输入命令:cd D:\Program Files\JavaTool\MySQL\mysql-5.6.39-winx64\bin 进入mysql的bin文件夹(不管有没有配置过环境变量,也要进入bin文件夹,否则之后启动服务仍然会报错误2)

输入mysqld -install(如果不用管理员身份运行,将会因为权限不够而出现错误:Install/Remove of the Service Denied!)F:\JAVAWord\mysql-5.7.19-winx64\bin>mysqld -install

Service successfully installed.

4.进入bin目录执行mysqld --initialize-insecure --user=mysqlF:\JAVAWord\mysql-5.7.19-winx64\bin>mysqld --initialize-insecure --user=mysql

5.输入命令:net start mysql,启动MYSQL服务。F:\JAVAWord\mysql-5.7.19-winx64\bin>net start mysql

MySQL 服务正在启动 .

MySQL 服务已经启动成功。

6.服务启动成功之后,输入命令:mysql -u root -p(第一次登录没有密码,直接按回车过)!F:\JAVAWord\mysql-5.7.19-winx64\bin>mysql -u root -p

Enter password:    (这里点击回车即可)

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 3

Server version: 5.7.19 MySQL Community Server (GPL)

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

7.输入:update mysql.user set authentication_string=password('123456') where user='root' and Host = 'localhost';设置密码mysql> update mysql.user set authentication_string=password('123456') where user='root' and Host = 'localhost' ;

Query OK, 1 row affected, 1 warning (0.00 sec)

Rows matched: 1  Changed: 1  Warnings: 1

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值