Home > Database > Mysql Tutorial > MySQLWindowsZIP免安装版的设置和启动_MySQL

MySQLWindowsZIP免安装版的设置和启动_MySQL

WBOY
Release: 2016-06-01 13:01:31
Original
1070 people have browsed it

MySQL Windows ZIP免安装版,设置和启动的过程其实挺麻烦的。下面一步一步介绍使用的过程:

1、下载Windows (x86, 64-bit), ZIP Archive:
2、解压zip文件
3、复制mysql下的my-default.ini,在同目录下创建my.ini。简单的配置:
basedir = D:/mysql-5.6.22-winx64
datadir = D:/mysql-5.6.22-winx64/data
character-set-server=utf8

4、设置环境变量PATH。将 D:\mysql-5.6.22-winx64\bin 加入path中。
5、启动并显示log:
管理员身份命令行> mysqld –console
6、注册mysql为windows服务:
管理员身份命令行> mysqld install

进入服务管理器,查看服务是否已经注册成功:> services.msc

移除MySQL服务命令:> mysqld remove

注:如果安装windows服务失败,使用“sc delete MySQL”命令删除服务,再重试。

7、启动MySQL服务:> net start mysql

注:如果第一次启动失败,运行“mysqladmin -uroot -p shutdown”后再启动试试。

停止MySQL服务命令:> net stop mysql

8、登录MySQL:mysql -u root -p

9、修改用户密码:
mysql> GRANT ALL ON . TO ‘root’@’localhost’ IDENTIFIED BY ‘123456’

10、其他测试命令:
D:\mysql-5.6.22-winx64\bin> mysqlshow
D:\mysql-5.6.22-winx64\bin> mysqlshow -uroot -p123456 mysql
D:\mysql-5.6.22-winx64\bin> mysql test

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template