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 % of total RAM for dedicated server, else %.
# 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.-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.-winx64\bin>mysqld.exe console
-- :: [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.-winx64\bin>mysqld.exe --console
-- :: [Warning] TIMESTAMP with implicit DEFAULT value is depreca
ted. Please use --explicit_defaults_for_timestamp server option (see documentati
on for more details).
-- :: [Note] Plugin 'FEDERATED' is disabled.
mysqld.exe: Table 'mysql.plugin' doesn't exist
-- :: [ERROR] Can't open the mysql.plugin table. Please run m
ysql_upgrade to create it.
-- :: [Note] InnoDB: Using atomics to ref count buffer pool p
ages
-- :: [Note] InnoDB: The InnoDB memory heap is disabled
-- :: [Note] InnoDB: Mutexes and rw_locks use Windows interlo
cked functions
-- :: [Note] InnoDB: Compressed tables use zlib 1.2.
-- :: [Note] InnoDB: Not using CPU crc32 instructions
-- :: [Note] InnoDB: Initializing buffer pool, size = 128.0M
-- :: [Note] InnoDB: Completed initialization of buffer pool
-- :: [Note] InnoDB: Highest supported file format is Barracu
da.
-- :: [Note] InnoDB: rollback segment(s) are active.
-- :: [Note] InnoDB: Waiting for purge to start
-- :: [Note] InnoDB: 5.6. started; log sequence number -- :: [Warning] No existing UUID has been found, so we assume
that this is the first time that this server has been started. Generating a new
UUID: dcd35109-ca0e-11e3-a872-003018a05bef.
-- :: [Note] Server hostname (bind-address): '*'; port:
-- :: [Note] IPv6 is available.
-- :: [Note] - '::' resolves to '::';
-- :: [Note] Server socket created on IP: '::'.
-- :: [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.-winx64\bin>mysqld.exe --console
-- :: [Warning] TIMESTAMP with implicit DEFAULT value is depreca
ted. Please use --explicit_defaults_for_timestamp server option (see documentati
on for more details).
-- :: [Note] Plugin 'FEDERATED' is disabled.
-- :: [Note] InnoDB: Using atomics to ref count buffer pool p
ages
-- :: [Note] InnoDB: The InnoDB memory heap is disabled
-- :: [Note] InnoDB: Mutexes and rw_locks use Windows interlo
cked functions
-- :: [Note] InnoDB: Compressed tables use zlib 1.2.
-- :: [Note] InnoDB: Not using CPU crc32 instructions
-- :: [Note] InnoDB: Initializing buffer pool, size = 128.0M
-- :: [Note] InnoDB: Completed initialization of buffer pool
-- :: [Note] InnoDB: Highest supported file format is Barracu
da.
-- :: [Note] InnoDB: rollback segment(s) are active.
-- :: [Note] InnoDB: Waiting for purge to start
-- :: [Note] InnoDB: 5.6. started; log sequence number -- :: [Warning] No existing UUID has been found, so we assume
that this is the first time that this server has been started. Generating a new
UUID: 8f19129f-ca0f-11e3-a876-003018a05bef.
-- :: [Note] Server hostname (bind-address): '*'; port:
-- :: [Note] IPv6 is available.
-- :: [Note] - '::' resolves to '::';
-- :: [Note] Server socket created on IP: '::'.
-- :: [Note] Event Scheduler: Loaded events
-- :: [Note] mysqld.exe: ready for connections.
Version: '5.6.17' socket: '' port: MySQL Community Server (GPL)

证明mysql服务已启动

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

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

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

到此结束.

mysql.zip免安装版配置的更多相关文章

  1. MySQL数据库免安装版配置

    参考文章: http://www.bkjia.com/Mysql/1093427.html

  2. mysql免安装版配置与使用方法

    mysql免安装版配置与使用方法      以mysql-noinstall-5.1.6(win32)为例 1>把压缩文件mysql-noinstall-5.1.6-alpha-win32.zi ...

  3. C#自制Web 服务器开发:mysql免安装版配置步骤详解分享

    mysql免安装版配置步骤详解分享 1.准备工作 下载mysql的最新免安装版本mysql-noinstall-5.1.53-win32.zip,解压缩到相关目录,如:d:\ mysql-noinst ...

  4. MySQL 5.7 免安装版配置

      MySQL5.7免安装版配置 Mysql是一个比较流行且很好用的一款数据库软件,如下记录了我学习总结的mysql免安装版的配置经验. 一. 软件下载 5.7 32位https://dev.mysq ...

  5. Windows mysql免安装版配置。(版本号-5.6.45);

    Windows mysql免安装版配置.(版本号-5.6.45); 来自对 https://blog.csdn.net/weixin_42831477/article/details/81325691 ...

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

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

  7. Mysql免安装版配置教程和常用命令图

    Mysql免安装版配置教程 图文版 配置环境变量 新建一个my.ini文件,添加下面内容 [mysqld] basedir=C:\\software\Mysql\mysql-5.7.14-winx64 ...

  8. MySQL 5.7.21 免安装版配置教程

    MySQL是世界上目前最流行的开源数据库.许多大厂的核心存储往往都是MySQL. 要安装MySQL,可以直接去官方网站下载.本教程将说明对于MySQL的免安装版如何进行配置和安装. 官方下载:http ...

  9. mysql免安装版配置使用

    mysql免安装版配置使用 1.下载解压 2.配置环境变量 变量MYSQL_HOME  = 解压目录 配置变量path 编辑,在后面加上  ;%MYSQL_HOME%\bin 3.修改配置文件 增加或 ...

随机推荐

  1. sort排序中的坑

    问题的产生原因: 在一篇阿里面试题的跟帖中,很多人应用sort()方法对数组进行排序.看似合情合理的代码,运行结果却频频出错.为什么呢?因为很多人都忽略掉了一点,那就是sort()排序默认情况下是按A ...

  2. Jersey(1.19.1) - Client API, Proxy Configuration

    为 Jersey Client 设置代理,可以使用带有 ClientHandler 参数的构造方法创建 Client 实例. public static void main(String[] args ...

  3. HDOJ2008数值统计

    数值统计 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submis ...

  4. Arnold+Shave 渲染毛发

    Arnold是一款基于真实物理光照算法和光线追踪算法的照片级渲染器,参与过多部好莱坞大片的制作,公司官网是:www.solidangle.com,官网上有很多效果图: 这里自己用一个球体测试了一下效果 ...

  5. 晒下自己App广告平台积分墙收入,顺便点评几个广告平台

    这是我之前发在爱开发App源码论坛的文章.分享了我从2011年到现在移动广告方面的收入和一些心得. 产品类型:FC.街机模拟器类App游戏 广告平台:万普世纪 广告形式:积分墙,用户先试玩几次,再玩需 ...

  6. 转:SqlServer2008误操作数据(delete或者update)后恢复数据

    Sqlserver2008误操作数据(delete或者update)后恢复数据(转) 实际工作中,有时会直接在数据库中操作数据,比如对数据进行delete或者update操作,当进行这些操作的时候,如 ...

  7. jQuery之锚点带动画跳转特效

    背景图片为金木研,这是我最爱的一张图. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" &quo ...

  8. poj 1077 Eight(A*)

    经典的八数码问题,用来练习各种搜索=_=.这题我用的A*做的,A*的主要思想就是在广搜的时候加了一个估价函数,用来评估此状态距离最终状态的大概距离.这样就可以省下很多状态不用搜索.对于每个状态设置一个 ...

  9. 韩顺平细说Servlet视频系列意外收获之用命令行编译带有包的java类解决方案

    命令行编译带有包的java类 在命令行编译这一块,基本上都是新手入门时了解一下,然后就直奔IDE而去.这样固然没错,就怕那些--.然后今天在视频中看到了这种方法,觉得可能会用到,所以就记录下来了,以备 ...

  10. oracle pl/sql的操作大全

    --删除该用户及下面的所有关联 DROP USER fspdrs CASCADE; --创建一个用户 create user fspdrs identified " default tabl ...