亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

windows——免安裝版mysql5.7的安裝

標簽:
MySQL 云計算

前言

电脑是64位的, 我呢就有强迫症,软件也要装64位的。但是在访问mysql官网之后我发现mysql5.7是没有64位安装包的——好尴尬

然后进入mysql官网下载页面发现免安装的版本有64位的,就下载了64位 的压缩包。

下载

图片描述
图片描述

下载连接:https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.18-winx64.zip

解压(路径:E:\software\mysql-5.7.18-winx64)

图片描述

文件配置

图片描述
新建data文件夹
新建my.ini文件
my.ini文件内容如下

[client]
port=3306
default-character-set=utf8

[mysqld] 

basedir = "E:/software/mysql-5.7.18-winx64"# 设置为MYSQL的安装目录 
datadir = "E:/software/mysql-5.7.18-winx64/data"# 设置为MYSQL的数据目录 
port=3306
character_set_server=utf8
sql_mode=NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER
explicit_defaults_for_timestamp=true#开启查询缓存

配置环境变量

只需要将路径指向bin目录(见图)

注:怎样添加环境变量点我查看

图片描述

开始敲命令吧

以管理员身份运行“命令提示符”

图片描述

命令过程如下

C:\windows\system32>mysqld -install      #安装mysql
Service successfully installed.

C:\windows\system32>mysqld --initialize-insecure      #mysql初始化

C:\windows\system32>net start mysql      #启动mysql服务
MySQL 服务正在启动 .
MySQL 服务已经启动成功。

C:\windows\system32>mysql -uroot -p     #登录mysql
Enter password:       #密码为空
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.18 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> set password for root@localhost = password('root');    #修改root用户密码为“root”
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> exit   #退出mysql
Bye

C:\windows\system32>mysql -uroot -p      #再次登录测试
Enter password: ****         #密码为root登录成功
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.18 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> exit   #退出mysql
Bye

如有任何问题可在下方留言,你我共同进步。

點擊查看更多內容
TA 點贊

若覺得本文不錯,就分享一下吧!

評論

作者其他優質文章

正在加載中
全棧工程師
手記
粉絲
218
獲贊與收藏
1546

關注作者,訂閱最新文章

閱讀免費教程

  • 推薦
  • 3
  • 收藏
  • 共同學習,寫下你的評論
感謝您的支持,我會繼續努力的~
掃碼打賞,你說多少就多少
贊賞金額會直接到老師賬戶
支付方式
打開微信掃一掃,即可進行掃碼打賞哦
今天注冊有機會得

100積分直接送

付費專欄免費學

大額優惠券免費領

立即參與 放棄機會
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號

舉報

0/150
提交
取消