如何在64位WIN7下安装64位的解压版mysql-5.6.37-winx64.zip

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)

 

转载于:https://www.cnblogs.com/bjgua/p/7463199.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/268507.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

android theme 错误,为什么修改android:theme就崩溃,求助

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼01-08 04:49:31.229: E/AndroidRuntime(4688): FATAL EXCEPTION: main01-08 04:49:31.229: E/AndroidRuntime(4688): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.iweixin/com.example.iweix…

一次自定义Configuration的悲惨经历。

终于发现问题了。。。太不容易了。。。5555昨天偶然想起来把一个项目中生成静态页配置文件做成一个单独到config文件。由于以前没有接触过自定义Configuration动手前上网查一下资料,发现蛮简单的。。定义section。。。定义属性。。。ConfigurationProperty声明。很快…

A query was run and no Result Maps were found for the Mapped Statement

原因:这是因为查询的结果集没有书写返回的类型resultType/resultMap 修改后如下

android+4.4.2+横屏,Android 横竖屏和布局问题

在这里我做了一个小test,之前看过关于这方面的东西,到后来我才真正的遇到项目的时候,不得已才要去真正的熟悉里面的流程。这里我贴测试源码:TestActivity.javapackage cn.com.hrmdemo;import Android.app.Activity;import android.content.re…

Silverlight 3 全系列开发工具发布

Silverlight 3 全系列开发工具发布Expression Studio 3Make your vision real with the four professional tools in Microsoft Expression Studio 3. Design for standards-based web sites, rich desktop experiences or Silverlight. Includes Expression Blend™ SketchFl…

KVM安装

KVM安装 1.查看系统是否支持,grep -E (vmx|svm) /proc/cpuinfo --color 2.安装kvm管理,yum install -y qemu-kvm libvirt 3.安装虚拟机工具,yum install -y virt-install 使用: 启动 service libvirtd start 启动后创建virbr0,192…

Android实现打开本地文件,Android 打开本地文件(示例代码)

Android 打开本地的文件,目前来说,其实很常见。而且现在有手机版的office了。查看office的全家桶就更加方便。首先要知道的是,Android 打开本地文件是根据类型打开的,也就是根据文件的 MIME 类型来确定如果不知道是什么类型&#…

mysql配置文件注解

#BEGIN CONFIG INFO#DESCR: 4GB RAM, 只使用InnoDB, ACID, 少量的连接, 队列负载大#TYPE: SYSTEM#END CONFIG INFO## 此mysql配置文件例子针对4G内存# 主要使用INNODB#处理复杂队列并且连接数量较少的mysql服务器# # 将此文件复制到/etc/my.cnf 作为全局设置,# mysql-data-dir/…

8 线性表-循环队列-顺序存储

这几天犹豫了一下要不要上机实现数据结构的代码 一轮复习已经结束了 第二次看还是觉得光看书实在太无感了 于是决定来上机 顺便加深印象 即使考不上 记录一些基础的知识 以后找工作也有用…… 好 就这样决定咧!不能偷懒! 1、循环队列: 实际上…

Android九点阵手势识别,能量黑科技模块八-九:两路按键颜色手势魔块

8. 两路按键魔块模块一共有两路硅胶按键,可以检测按键是否按下。当按键按下时,对应按键背后的红色LED会亮,并且返回触发信号,按键按下事件为真。另外按键键帽上可安装乐高十字插销。8.1. 详细介绍8.2. 参数介绍支持电压&#xff1…

Nhibernate教程2(3)

2)含有关系的表的情况 含有关系的表指的是像学生这样,除了保存学生的基本信息,还希望把选课信息保存到学生的类中。这样情况下不能用软件来辅助产生对应的类和XML,这是NHibernate中唯一需要费脑筋学的地方。学生表对应的类和XML如…

新概念4-41

Lesson 41 Training elephants 训练大象 Two main techniques have been used for training elephants, which we may respectively the tough and the gentle. The former method simply consists of setting an elephant to work and beating him until he does what …

RC和RR级别下的InnoDB快照读有什么不同

首先简介mysql四种隔离级别: 未提交读(READ UNCOMMITED)脏读 已提交读 (READ COMMITED)简称(RC) 不可重复读 可重复读(REPEATABLE READ)简称(RR ) 可串行化&#xff…

html5属性详解,HTML5中的download属性详解

一、download属性是个什么?如果我们想实现点击上面的下载按钮下载一张图片,你会如何实现?我们可能会想到一个最简单的方法,就是直接按钮a标签链接一张图片,类似下面这样:下载但是,想法虽好&…

[新手及懒人适用]轻松恢复误Ghost的硬盘

首先感谢51CTO有这么好的网络平台,很荣幸本周成为推荐博客。在高兴的同时,倍感压力,毕竟,51CTO看得见的看不见的大牛太多,而自己需要完善的东西还太多太多............好在,我会坚持自己最初在51CTO写博的初…

c:forEach 如何输出序号

关键在于<c:forEach>的varStatus属性&#xff0c;具体代码如下&#xff1a; <table width"500" border"0" cellspacing"0" cellpadding"0"> <tr> <th>序号</th> <th>姓名</th> <…