MYSQL ZIP免安装版配置

1. 下载MySQL 选择自己想要的.本次安装.我使用的是mysql-5.6.17-winx64 

地址:http://dev.mysql.com/downloads/mysql/

2. 解压zip 文件. 在mysql 的根目录下找到  my-default.ini  复制出一个 my.ini 文件, 根据你需要的位置修改 my.ini 文件

a)在[mysqld]下追加
-------
basedir = "d:\\mysql"
datadir = "d:\\mysql\\data"
character-set-server = utf8
-------
b) 在[client]下追加
-------
default-character-set = utf8

# 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 = .....basedir =D:\work\mysql-5.6.17-winx64
datadir =F:\db-data\mysql
character-set-server = utf8# 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 sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES [client]
default-character-set = utf8

3. 启动服务

保存

my.ini

的配置,然后打开命令行切换到mysql解压目录下的bin 目录;

执行 mysqld.exe console 命令测试一下

D:\work\mysql-5.6.17-winx64\bin>mysqld.exe console
2014-04-22 19:11:09 0 [Warning] TIMESTAMP with implicit DEFAULT value is depreca
ted. Please use --explicit_defaults_for_timestamp server option (see documentati
on for more details).

然后执行 mysqld.exe console 命令启动mysql

D:\work\mysql-5.6.17-winx64\bin>mysqld.exe --console
2014-04-22 19:11:33 0 [Warning] TIMESTAMP with implicit DEFAULT value is depreca
ted. Please use --explicit_defaults_for_timestamp server option (see documentati
on for more details).
2014-04-22 19:11:33 5624 [Note] Plugin 'FEDERATED' is disabled.
mysqld.exe: Table 'mysql.plugin' doesn't exist
2014-04-22 19:11:33 5624 [ERROR] Can't open the mysql.plugin table. Please run m
ysql_upgrade to create it.
2014-04-22 19:11:33 5624 [Note] InnoDB: Using atomics to ref count buffer pool p
ages
2014-04-22 19:11:33 5624 [Note] InnoDB: The InnoDB memory heap is disabled
2014-04-22 19:11:33 5624 [Note] InnoDB: Mutexes and rw_locks use Windows interlo
cked functions
2014-04-22 19:11:33 5624 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-04-22 19:11:33 5624 [Note] InnoDB: Not using CPU crc32 instructions
2014-04-22 19:11:33 5624 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2014-04-22 19:11:33 5624 [Note] InnoDB: Completed initialization of buffer pool
2014-04-22 19:11:33 5624 [Note] InnoDB: Highest supported file format is Barracu
da.
2014-04-22 19:11:33 5624 [Note] InnoDB: 128 rollback segment(s) are active.
2014-04-22 19:11:33 5624 [Note] InnoDB: Waiting for purge to start
2014-04-22 19:11:33 5624 [Note] InnoDB: 5.6.17 started; log sequence number 1600
607
2014-04-22 19:11:33 5624 [Warning] No existing UUID has been found, so we assumethat this is the first time that this server has been started. Generating a newUUID: dcd35109-ca0e-11e3-a872-003018a05bef.
2014-04-22 19:11:33 5624 [Note] Server hostname (bind-address): '*'; port: 3306
2014-04-22 19:11:33 5624 [Note] IPv6 is available.
2014-04-22 19:11:33 5624 [Note]   - '::' resolves to '::';
2014-04-22 19:11:33 5624 [Note] Server socket created on IP: '::'.
2014-04-22 19:11:33 5624 [ERROR] Fatal error: Can't open and lock privilege tabl
es: Table 'mysql.user' doesn't exist

注:这里出现异常 :Table 'mysql.user' doesn't exist 是因为我没有吧数据文件复制到 my.ini 里面配置的路径下,

数据文件是在 mysql 解压目录的下 的 data 目录, 吧整个目录里的内容复制到配置文件里写的目录里,然后启动

D:\work\mysql-5.6.17-winx64\bin>mysqld.exe --console
2014-04-22 19:16:31 0 [Warning] TIMESTAMP with implicit DEFAULT value is depreca
ted. Please use --explicit_defaults_for_timestamp server option (see documentati
on for more details).
2014-04-22 19:16:31 6180 [Note] Plugin 'FEDERATED' is disabled.
2014-04-22 19:16:31 6180 [Note] InnoDB: Using atomics to ref count buffer pool p
ages
2014-04-22 19:16:31 6180 [Note] InnoDB: The InnoDB memory heap is disabled
2014-04-22 19:16:31 6180 [Note] InnoDB: Mutexes and rw_locks use Windows interlo
cked functions
2014-04-22 19:16:31 6180 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-04-22 19:16:31 6180 [Note] InnoDB: Not using CPU crc32 instructions
2014-04-22 19:16:31 6180 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2014-04-22 19:16:31 6180 [Note] InnoDB: Completed initialization of buffer pool
2014-04-22 19:16:32 6180 [Note] InnoDB: Highest supported file format is Barracu
da.
2014-04-22 19:16:32 6180 [Note] InnoDB: 128 rollback segment(s) are active.
2014-04-22 19:16:32 6180 [Note] InnoDB: Waiting for purge to start
2014-04-22 19:16:32 6180 [Note] InnoDB: 5.6.17 started; log sequence number 1625
987
2014-04-22 19:16:32 6180 [Warning] No existing UUID has been found, so we assumethat this is the first time that this server has been started. Generating a newUUID: 8f19129f-ca0f-11e3-a876-003018a05bef.
2014-04-22 19:16:32 6180 [Note] Server hostname (bind-address): '*'; port: 3306
2014-04-22 19:16:32 6180 [Note] IPv6 is available.
2014-04-22 19:16:32 6180 [Note]   - '::' resolves to '::';
2014-04-22 19:16:32 6180 [Note] Server socket created on IP: '::'.
2014-04-22 19:16:32 6180 [Note] Event Scheduler: Loaded 0 events
2014-04-22 19:16:32 6180 [Note] mysqld.exe: ready for connections.
Version: '5.6.17'  socket: ''  port: 3306  MySQL Community Server (GPL)

证明mysql服务已启动

6. 设置登陆mysql root帐号的的密码

在mysql/bin 目录下打开新的命令行,输入mysql 回车

D:\work\mysql-5.6.17-winx64\bin>mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.17 MySQL Community Server (GPL)Copyright (c) 2000, 2014, 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>

看到上面类似内容说明登陆成功,此时的root帐号是没有密码的,而我也没打算要密码

想要设置可使用命令

直接运行命令行窗口输入下面的

mysqladmin -u root password

你的密码

这样就Ok了,

7. 安装mysql服务

在bin目录下执行命令

mysqld.exe --install MySQL5.6.17 --defaults-file="D:\work\mysql-5.6.17-winx64\my.ini" 

结果如下.

D:\work\mysql-5.6.17-winx64\bin>mysqld.exe --install MySQL5.6.17 --defaults-file
="D:\work\mysql-5.6.17-winx64\my.ini"
Service successfully installed.

8.启动服务

net start MySQL5.6.17
D:\work\mysql-5.6.17-winx64\bin>net start MySQL5.6.17
MySQL5.6.17 服务正在启动 .
MySQL5.6.17 服务已经启动成功。

注:若启动不成功修改注册表开始->运行->regedit
找HKEY_LOCAL_MECHINE---SYSTEM ---ControlSet001或ControlSet002中找Services,
再找MySQL项,修改 ImagePath值改为:"D:\work\mysql-5.6.17-winx64\bin\mysqld" --defaults-file="D:\work\mysql-5.6.17-winx64\my.ini" MySQL

最后为了方便添加环境变量.

MYSQL=D:\work\mysql-5.6.17-winx64

Path=%MYSQL%/bin;Path...

测试:

C:\Windows\System32>SET PATH=%MYSQL%\bin;%PATH%C:\Windows\System32>echo PATH
PATHC:\Windows\System32>echo %PATH%
D:\work\mysql-5.6.17-winx64\bin;D:\Program Files\java\jdk1.7.0_15\bin;D:\ProgramFiles\java\jdk1.7.0_15\jre\bin;C:\Windows\system32;C:\Windows;C:\Windows\System
32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\C:\Windows\System32>mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.6.17 MySQL Community Server (GPL)Copyright (c) 2000, 2014, 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>

到此结束.

转载于:https://www.cnblogs.com/mjorcen/p/3681328.html

mysql.zip免安装版配置相关推荐

  1. mysql server 5.6root_root密码mysqlMySQL-5.6.24免安装版配置方法

    MySQL-5.6.24免安装版配置方法,有需要的朋友可以参考下. 1. 下载MySQL Community Server 5.6.24 2. 解压MySQL压缩包 将以下载的MySQL压缩包解压到自 ...

  2. mysql 5.5 免安装_mysql 5.5.56免安装版配置方法

    mysql 5.5.56免安装版配置方法,本文通过文字代码详解,具体内容如下所示: 1. 下载mysql-5.5.56-winx64 网址: dev.mysql.com/downloads/mysql ...

  3. mysql免安装如何改密码_mysql免安装版配置与修改密码的教程

    第一步:配置环境变量(我的解压路径:G:\mysql\mysql-5.7.21-winx64 ) MYSQL_HOME=你解压的路径 PATH = ;%MYSQL_HOME %\bin; PATH变量 ...

  4. mysql免安装版配置百度_mysql -5.7.10 免安装版配置

    该楼层疑似违规已被系统折叠 隐藏此楼查看此楼 MySQL-5.7.10免安装版配置方法 1. 下载MySQL Community Server 5.7.10 解压MySQL压缩包 将以下载的MySQL ...

  5. MySQL安装 MySQL5.7.10免安装版配置,mysql5.7.10免安装版

    MySQL5.7.10免安装版配置,mysql5.7.10免安装版  最新版的 Mysql 不提供图形界面的安装了, 下载下来是一个压缩包的形式, 那么我们如何来使用它呢, 让它为我们工作呢? 环境: ...

  6. MySQL免安装版配置部署详细教程

    MySQL免安装版配置部署详细教程 这里写目录标题 MySQL免安装版配置部署详细教程 部署MySQL免安装版(windows版) 1.windows的mysql配置文件是my.ini,将此文件放到m ...

  7. MySQL 8.0.23免安装版配置步骤

    @C MySQL 8.0.23免安装版配置步骤 首先进入MySQL官网,链接: MySQL官网. 1.选择DOWNLOADS; 2.在页面最底端选择MySQL Community (GPL) Down ...

  8. win764位mysql免安装_win7 64位系统 下的mysql 5.6 免安装版配置

    2.修改my.ini 文件 copy default.ini 并修改 [client] port=3306 default-character-set=utf8 #客户端字符类型,与服务端一致就行,建 ...

  9. MySql 5.7.26版本免安装版配置过程及相关问题解决(win10版)

    时间:2019年7月26日 目的:安装mysql解压版 一.下载安装 1.下载mysql5.7.26 下载地址:MySQL :: Download MySQL Community Server 下载完 ...

最新文章

  1. 惊了,老板要我开发一个工作流引擎!
  2. C#的ARRAYLIST 和HASHTABLE示例代码
  3. SSH 远程连接原理及故障排错详解
  4. rhel7 http实例2
  5. 回归素材(part4)--python机器学习基础教程
  6. linux查看端口所占用的进程号
  7. final关键字_Java面试-谈谈对final关键字的理解
  8. 编程语言对比 引用数据类型-列表
  9. OpenGL基础25:多光源(附简单GLSL配置)
  10. 怎么复制豆丁网的文字
  11. TCP/IP协议学习总结
  12. 基于 SpringBoot + MyBatis 的在线五子棋对战
  13. python爬取b站番剧链接,Scrapy爬虫爬取B站视频标题及链接
  14. 翻译题9寒假1周赛题
  15. 启发式搜索算法 - 以A*为中心来说明启发式算法本质是要找有效的heuristic需要满足的性质
  16. PUN 2 菜鸟养成记 3进入游戏
  17. Camunda流程引擎及表结构认识
  18. BAT大牛分享如何在最短的时间升职为阿里Java架构师
  19. 一个50岁大叔学编程的真实故事——任何时候学习都不晚
  20. select下拉框添加搜索功能

热门文章

  1. debian dhcp服务启动不了_DHCP服务器配置
  2. php签名墙,肺功能检查质量控制网
  3. 数据库备份 java jar_Java实现数据库备份并利用ant导入SQL脚本
  4. 深入理解计算机系统 视频教程,深入理解计算机系统1
  5. #获得请求来源ip_以太网数据包TCP、IP、ICMP、UDP、ARP协议头结构详解
  6. 交叉编译android版htop
  7. 计算机专业女兵,陈豪2010《点解阿Sir》剧照
  8. leetcode 1. 两数之和 思考分析
  9. CodeForces 560A,B,C
  10. 哈希拓展--布隆过滤器