MySQL5.6 安装配置

[size=x-large]1、下载MySQL安装到指定目录下。[/size]

[size=x-large]2、复制安装目录下my-default.ini 为 my.ini,并修改相关信息[/size]

# 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.
basedir = D:\Program Files\MySQL\MySQL Server 5.6\
datadir = D:\Program Files\MySQL\MySQL Server 5.6\data\
port = 3306
server_id = 1

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


[size=x-large]3、将安装路径"D:\Program Files\MySQL\MySQL Server 5.6\bin\"添加到系统环境变量。[/size]

[size=x-large]4、以管理员身份运行CMD,并执行命令将MySQL安装为系统服务:[/size]

安装:[b]mysqld install MySQL[/b]
移除:[b]mysqld remove[/b]


[size=large]5、启动MySQL服务[/size]
方法1:CMD下执行:net start MySQL
方法2:进入服务启动MySQL服务

[size=x-large]6、修改root账号密码[/size]

D:\Program Files\MySQL\MySQL Server 5.6\bin>[b]mysql -uroot[/b]
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.17 MySQL Community Server (GPL)

Copyright (c) 2000, 2014, 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> [b]show databases;[/b]
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
+--------------------+
4 rows in set (0.05 sec)

mysql>[b] use mysql;[/b]
Database changed

mysql> [b]update user set password=PASSWORD('12345') where user='root';[/b]
Query OK, 3 rows affected (0.08 sec)
Rows matched: 3 Changed: 3 Warnings: 0

mysql>[b] flush privileges;[/b]
Query OK, 0 rows affected (0.00 sec)

mysql>[b] quit[/b]
Bye
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值