您的位置:首页 > 数据库 > MySQL

mysql 5.6.29 绿色版安装

2016-03-20 22:30 465 查看
1,配置Path变量 :F:\developMent\mysqlinstall\mysql-5.6.29-winx64\bin

2,将安装目录下的my-default.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]
character-set-server=utf8

# 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=F:\developMent\mysqlinstall\mysql-5.6.29-winx64
datadir=F:\developMent\mysqlinstall\mysql-5.6.29-winx64\data
port=3306

character-set-server=utf8
default-storage-engine=INNODB
innodb_data_home_dir=F:\developMent\mysqlinstall\mysql-5.6.29-winx64\data
innodb_data_file_path=ibdata1:12M:autoextend
innodb_log_group_home_dir=F:\developMent\mysqlinstall\mysql-5.6.29-winx64\data

innodb_buffer_pool_size=3072M
innodb_log_file_size=4G
# 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


3,将修改好的my.ini文件复制一份到windows根目录下.

4,到system32目录中,右键管理员方式运行cmd.exe,进入到mysql根目录/bin中,

F:\developMent\mysqlinstall\mysql-5.6.29-winx64\bin>mysqld --install MySQL --defaults-file="C:\Windows\my.ini",如果需要更换服务名,将 --install mysql 更换为对应的 --install 服务名 即可.

出现 Service successfully installed. 表示服务安装成功.

5,F:\developMent\mysqlinstall\mysql-5.6.29-winx64\bin> net start mysql 启动服务.或者在 services.msc 中手动启动服务.

6,启动成功之后,F:\developMent\mysqlinstall\mysql-5.6.29-winx64\bin>mysql -uroot -p 连接到mysql 服务器. 默认密码为空.

7,mysql> show databases; 显示所有的数据库列表.

8,mysql> use mysql;连接到mysql 修改连接密码.

9,mysql> update user set password=password('root') where user='root'; 修改密码为root
10,mysql> create database xxxx character set utf8; 创建数据库并且设置字符集.

附带 Linux 下 masql 安装:

http://blog.csdn.net/cuker919/article/details/46481427

http://blog.csdn.net/typa01_kk/article/details/49058593
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  mysql 1067 my.ini