(1)到官网下载绿色版mysql:http://dev.mysql.com/downloads/mysql/
(2)下载好后,放在F:\mysql,解压出来
(3)进入到mysql-5.6.19-winx64这个文件夹,用记事本打开my-default.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. [client] default-character-set=utf8 [mysqld] # 设置mysql服务器编码 character_set_server=utf8 #basedir设置mysql的安装目录,如果目录中带空格则必须加引号 #datadir设置mysql数据库的数据的存放目录,文件夹名必须是data basedir=F:\mysql\mysql-5.6.19-winx64 datadir=F:\mysql\mysql-5.6.19-winx64\data
(4)保存退出
(5)注册服务
进入cmd命令行,进入F盘,F:/mysql/mysql-5.6.19-winx64/bin
mysql加入到服务中:mysqld --install mysql --defaults-file="F:/mysql/mysql-5.6.19-winx64/my-default.ini"
(6)修改mysql root用户密码,
mysqladmin -u root -p password
默认root用户密码为空,直接按回车,接下来输入新的密码和 确认密码
windows 安装绿色版mysql,布布扣,bubuko.com
时间: 2024-11-02 23:20:16