码迷,mamicode.com
首页 > 数据库 > 详细

MySQL–zip包安装

时间:2015-09-16 15:48:41      阅读:245      评论:0      收藏:0      [点我收藏+]

标签:

1.解压mysql-5.6.26-winx64.zip到任意位置,如:c:\

2.设置环境变量.

3.copy一份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]

# 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:\mysql-5.6.20-winx64
#数据文件存放目录
 datadir =C:\mysql-5.6.20-winx64\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

3.以管理员运行cmd,执行

mysqld -install

技术分享

将MySQL的安装到windows的服务,可以用

services.msc

查看MySQL服务已经启动;

mysqld –remove 将卸载服务

4.启动MySQL服务

net start mysql

技术分享

net stop mysql 将停止服务

5.登陆

mysql -u root -p

第一次运行密码为空;

修改密码:

mysqladmin -uroot -p password <新密码>

技术分享

运行:

show variables like ‘%version%‘;

查看数据库的相关信息:

技术分享

MySQL–zip包安装

标签:

原文地址:http://www.cnblogs.com/lycsky/p/4813297.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!