Home >Database >Mysql Tutorial >Windows下MySQL zip版的简单安装_MySQL

Windows下MySQL zip版的简单安装_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 13:28:47974browse

bitsCN.com

Windows下MySQL zip版的简单安装

 

1、下载MySQL-5.5.10-win32.zip的版本。 

2、解压到任意路径,比如"D:/Programm Files/"。 

3、进入MySQL路径,复制my-small.ini为my.ini, 

在[mysqld]部分添加 

base dir = "D:/Program Files/Mysql-5.5.10-win32" 

datadir = "D:/Program Files/Mysql-5.5.10-win32/data"。 

# 设置mysql服务器的字符集(可选) 

default-character-set=gbk 

 

[client] 

# 设置mysql客户端的字符集(可选) 

default-character-set=gbk 

4、将MySQL的bin目录路径添加到系统变量里。(可选) 

5、注册服务 

CMD进入MySQL/bin文件夹 

mysqld --install "MySQL Database Service" --defaults-file= "D:/Program Files/MySQL-5.5.10-win32/my.ini" 

("MySQL Database Service"为服务名,带空格需用引号,可自取) 

("D:/Program Files/MySQL-5.5.10-win32/my.ini"为INI路径,带空格需用引号) 

启动服务 

net start "MySQL Database Service" 

6、首次登陆MySQL 

mysql -u root -p 

(密码为空) 

7、设置密码 

mysql> use mysql 

Database changed 

mysql> update user set PASSWORD = PASSWORD('你的新密码') where USER='root' and HOST='localhost'; 

Query OK, 1 row affected (0.05 sec) 

Rows matched: 1   Changed: 1   Warnings: 0 

 

mysql> flush privileges; 

mysql> exit 

8、完成。

bitsCN.com
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn