首先要说明的是,我主要讲的是windows下myslq社区版版本,有msi安装版的也有绿色版即zip压缩包。这里说的是zip压缩包。
下载地址:http://dev.mysql.com/downloads/mysql/
1.首先确定你的系统是多少位的操作系统,然后下载相应的压缩包。
2.解压压缩包,当然你可以将压缩包解压到磁盘上的任何一个地方。
3.配置环境变量,将你解压的目录配置进去,比如我的是:D:\software\mysql-5.6.17-winx64\bin,目的就是当你在dos窗口敲相应的命令时,widows会搜索你配置的环境变量中 的路径,找到相应的可执行程序执行。
4.配置自己的option file,这个是在mysql官网中有说明,noinstall
(免安装绿色版)版本必须要配置自己的,配置如下:
[mysqld] # set basedir to your installation path basedir=D:\\software\\mysql-5.6.17-winx64 # set datadir to the location of your data directory datadir=D:\\software\\mysql-5.6.17-winx64\\data保存文件名为my.ini,将此文件放到解压文件的目录下。
5.启动mysql:mysqld --install,打印信息如下:
C:\Users\a>mysqld --console 2014-04-17 14:06:17 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-17 14:06:17 11512 [Note] Plugin 'FEDERATED' is disabled. 2014-04-17 14:06:17 11512 [Note] InnoDB: Using atomics to ref count buffer pool pages 2014-04-17 14:06:17 11512 [Note] InnoDB: The InnoDB memory heap is disabled 2014-04-17 14:06:17 11512 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions 2014-04-17 14:06:17 11512 [Note] InnoDB: Compressed tables use zlib 1.2.3 2014-04-17 14:06:17 11512 [Note] InnoDB: Not using CPU crc32 instructions 2014-04-17 14:06:17 11512 [Note] InnoDB: Initializing buffer pool, size = 128.0M 2014-04-17 14:06:17 11512 [Note] InnoDB: Completed initialization of buffer pool 2014-04-17 14:06:17 11512 [Note] InnoDB: Highest supported file format is Barracuda. 2014-04-17 14:06:17 11512 [Note] InnoDB: 128 rollback segment(s) are active. 2014-04-17 14:06:17 11512 [Note] InnoDB: Waiting for purge to start 2014-04-17 14:06:17 11512 [Note] InnoDB: 5.6.17 started; log sequence number 1626107 2014-04-17 14:06:17 11512 [Note] Server hostname (bind-address): '*'; port: 3306 2014-04-17 14:06:17 11512 [Note] IPv6 is available. 2014-04-17 14:06:17 11512 [Note] - '::' resolves to '::'; 2014-04-17 14:06:17 11512 [Note] Server socket created on IP: '::'. 2014-04-17 14:06:17 11512 [Note] Event Scheduler: Loaded 0 events 2014-04-17 14:06:17 11512 [Note] mysqld: ready for connections. Version: '5.6.17' socket: '' port: 3306 MySQL Community Server (GPL)