1、到mysql官网下载 https://cdn.mysql.com//Downloads/MySQL-5.6/mysql-5.6.37-winx64.zip

2、将解压缩后的文件放到自己想要的地方,并配置环境变量。例如我存放的目录为:F:\mysql\mysql-5.6.14-winx64

在环境变量中添加:MYSQL_HOME:F:\mysql\mysql-5.6.14-winx64

在path路径中加入:%MYSQL_HOME%\bin

配置环境变量不是必须的,只是为了能更方便的在命令行中使用mysql的命令行工具。
3、修改ini配置文件

5.6.14的解压缩版里有一个my-default.ini文件,copy一份改名为my.ini放在同级目录下。修改my.ini,遵照第二篇文章的做法。我的my.ini内容如下:

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.

#[mysqld]

# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M

# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin

# These are commonly set, remove the # and set as required.
# basedir = .....
# datadir = .....
# port = .....
# server_id = .....

# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M

[mysqld]
  #设置字符集为utf8
loose-default-character-set = utf8
basedir = E:\MySql\mysql-5.6.37-winx64
datadir = E:\MySql\mysql-5.6.37-winx64\data
character-set-server = utf8
[client]
loose-default-character-set = utf8
[mysql]
loose-default-character-set = utf8
[WinMySQLadmin]
server = E:\MySql\mysql-5.6.37-winx64\bin\mysqld.exe

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

4、安装服务
    进入cmd:
(这个好像要管理员权限,我在C盘下搜索cmd.exe  -->  C:\Windows\winsxs\wow64_microsoft-windows-commandprompt_31bf3856ad364e35_6.1.7601.17514_none_f387767e655cd5ab\cmd.exe,右键以管理员身份运行。这个cmd.exe是64位的cmd。因为我安装的是64位的mysql)

输入命令:
C:\>e:
E:\>cd E:\MySql\mysql-5.6.37-winx64\bin
E:\MySql\mysql-5.6.37-winx64\bin>mysqld -install
Service successfully installed.
5、启动服务
E:\MySql\mysql-5.6.37-winx64\bin>cd\
E:\>net start mysql
MySQL 服务正在启动 .
MySQL 服务已经启动成功。
6、配置用户

还在上面的命令窗口里面,输入命令:mysql -u root -p
回车后提示输入密码。
mysql解压缩版初次安装管理员root的密码为空,因此直接再回车一次就登入mysql数据库了。

F:\>mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.14 MySQL Community Server (GPL)

Copyright (c) 2000, 2013, 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.

成功后

输入命令:use mysql;      /*使用mysql数据库*/
mysql> use mysql
Database changed

输入命令:select host,user,password from user;    /* 查看系统的账户信息 */
mysql> select host,user,password from user;
+-----------+------+----------+
| host      | user | password |
+-----------+------+----------+
| localhost | root |          |
| 127.0.0.1 | root |          |
| ::1       | root |          |
| localhost |      |          |
+-----------+------+----------+
4 rows in set (0.00 sec)

host:代表mysql服务允许哪个IP来的请求。localhost和127.0.0.1指mysql服务所在的主机,即本地。::1是IPV6的IP地址写法,
全称为:0000:0000:0000:0000:0000:0000:0000:0001。现在都是IPV4的网络,可以不用管他。
user:指账户名称。不同的host下账户名称可以相同。
password:密码。
可以看到,默认账户里只支持本地连接,并且账户没有密码。现在的问题明确了,就是要将匿名用户删除,为root用户添加远程访问和密码,再为自己添加个人账户。指令如下:

mysql> update user set password=PASSWORD('123456') where user='root';
Query OK, 3 rows affected (0.00 sec)
Rows matched: 3  Changed: 3  Warnings: 0

mysql> grant all on *.* to root@'%' identify by 'root';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'ident
ify by 'root'' at line 1
mysql> grant all on *.* to walle@'%' identify by '123456' with grant option;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'ident
ify by '123456' with grant option' at line 1
mysql> delete from where user='';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'where
 user=''' at line 1
mysql> select host,user,password from user;
+-----------+------+-------------------------------------------+
| host      | user | password                                  |
+-----------+------+-------------------------------------------+
| localhost | root | *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B |
| 127.0.0.1 | root | *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B |
| ::1       | root | *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B |
| localhost |      |                                           |
+-----------+------+-------------------------------------------+
4 rows in set (0.00 sec)

mysql> commit;
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

如何在64位WIN7下安装64位的解压版mysql-5.6.37-winx64.zip的更多相关文章

  1. linux下安装配置jdk(解压版)

    在linux下登录oracle官网,下载解压版jdk    传送门 系统默认下载到"下载"目录中 创建要将该文件解压的文件夹: 其中 -p 参数代表递归创建文件夹(可以创建多级目录 ...

  2. 64位Win7下安装与配置PHP环境【Apache+PHP+MySQL】

    [软件下载] 本安装实例所使用安装文件如图所示: 其中,64位版本的MySQL安装文件mysql-5.5.33-winx64.msi,可直接从官网下载,下载地址:http://dev.mysql.co ...

  3. 32位Win7下安装与配置PHP环境(一)

    运行PHP网站,主要需要安装.配置三个软件,Apache.PHP和MySQL.如果需要编辑调试PHP程序,还要安装一个编辑调试软件. 一. Apache Apache是和IIS类似的一个软件,是运行在 ...

  4. Windows下安装zip包解压版mysql

    Windows下安装zip包解压版mysql 虽然官方提供了非常好的安装文件,但是有的时候不想每次再重装系统之后都要安装一遍MySQL,需要使用zip包版本的MySQL.在安装时需如下三步: 1. 新 ...

  5. Windows下安装MySql5.7(解压版本)

    Windows下安装MySql5.7(解压版本) 1. 官方地址下载MySql Server 5.7 2. 解压文件到目录d:\Soft\mysql57下 3. 在上面目录下创建文件my.ini,内容 ...

  6. Windows10下安装解压版MySQL教程

    MySQL安装分为安装版和解压版,安装版主要是由一个exe程序式安装,有界面鼠标点击安装即可,小白建议使用安装版安装mysql,相比较与安装版,解压版安装更"纯净",没有多余的东西 ...

  7. Windows 7安装解压版MySQL 5.6(不包含配置文件优化)

    到官网下载MySQL5.6 下载地址:http://dev.mysql.com/downloads/mysql/5.6.html, 提供了 .exe版本 和 .zip解压版,因为我的操作系统是64位的 ...

  8. 【DataBase】 在Windows系统环境 下载和安装 解压版MySQL数据库

    MySQL官网解压版下载地址:https://dev.mysql.com/downloads/mysql/ 为什么不推荐使用安装版?无脑下一步,很多配置的东西学习不到了 点选第一个就好了,下面的是调试 ...

  9. 64位WIN7下安装MPICH2

    1.首先,下载32位的MPICH2,(注意哦,是32位,不是64位) http://202.117.4.228/files/B117000000042632/www.mcs.anl.gov/resea ...

随机推荐

  1. Capturing ASP.NET Application Startup Exceptions

    It has become common practice to perform tasks during an ASP.NET applications start up process. Thes ...

  2. C#中特殊的string类型

                                                                                  string C#有string关键字,在翻 ...

  3. 在sql server数据库可以插入在回车的数据

    insert into t_FamilyClass (id,ParentId,Name) values(111,111,'111')可以在编辑模式下copy到editplus中,设置 显示 空白字符: ...

  4. 【转】android中layout_weight的理解

    android Layout_weight的理解 SDK中的解释: Indicates how much of the extra space in the LinearLayout will be ...

  5. Java并发编程的3个特性

    一.原子性 原子行:即一个或者多个操作作为一个整体,要么全部执行,要么都不执行,并且操作在执行过程中不会被线程调度机制打断:而且这种操作一旦开始,就一直运行到结束,中间不会有任何上下文切换(conte ...

  6. Qt信号与槽 如何写2个类,一个发送信号,一个接收并处理

    题目: 假设要做2个类,一个类的值提供一个函数SetValue,当这个值发生变化时,假设>10就触发告警调用B的函数; ------------------------------------- ...

  7. CSR(certSigningRequest文件)导出步骤

    1.打开钥匙串访问 2.请求证书 3.电子邮箱.保存位置 电子邮箱其实是可以乱填的,但是为了规范,还是填注册时用的邮箱吧. 4.保存到桌面 5.结果

  8. PTA数据结构之 List Leaves

    Given a tree, you are supposed to list all the leaves in the order of top down, and left to right. I ...

  9. MongoDB 副本集配置,开启账号认证

    MongoDB 自带功能强大的主从,配置也很简单,从零开始花了30分钟搞定 3台以上机器IP: 192.168.1.24, 192.168.1.25, 192.168.1.26, 192.168.1. ...

  10. python文件操作-修改文件中的内容

    一.文件读写有缓冲区 fw = open('nhy','w') fw.write('sdfsdf') fw.flush()# 把缓冲区里面的数据立即写到磁盘上 fw.close() 二.with的用法 ...