mysql zip 安装

电脑中存的是mysql_5.6.24版本的。安装过程中遇到些麻烦,记录一下。

一开始去官网上下载了最新的5.7.12版的,一直启动不了mysql的服务。发现原因是,电脑中本来安装了5.6.24版本的,有冲突了应该。5.7.12版的解压后没有data目录,很蛋疼,也没有找到解决方法,网上说要在一开始执行一条命令。以后还是去官网看说明吧。这个暂时不看了。

然后就直接安装5.6.24版本的,可是也是一直安装不成功,这里就要注意配置文件的书写格式。

mysql默认读取的是安装目录下的my.ini文件。

可以看一下这篇博客:http://www.cnblogs.com/freeton/p/4264829.html

最简单的配置方式就是改一下根目录和数据文件存放目录。

# 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.
#mysql根目录
 basedir ="C:\Program Files\mysql-5.6.22-win32"
#数据文件存放目录
 datadir ="C:\Program Files\mysql-5.6.22-win32\data"
# port = .....   端口,默认3306
# 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 

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 
#服务端的编码方式
character-set-server=utf8
[client]
#客户端编码方式,最好和服务端保存一致
loose-default-character-set = utf8

[WinMySQLadmin]  
Server = "C:\Program Files\mysql-5.6.22-win32\bin\mysqld.exe"

  

posted @ 2016-04-16 15:16  Jokerone  阅读(211)  评论(0编辑  收藏  举报