MySQL 免安装版配置

​ 操作系统:Windows 7 Ultimate SP1

​ MySQL版本:5.7

解压

​ 解压到自己喜欢的路径

更改配置文件

在解压目录新建Data目录,这一步不能省略,否者后面会出现错误。

​ 更改my-default.ini,重命名改为my.ini,更改内容

[mysqld]

#忽略登陆检查

skip_grant_tables

#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:\soft\mysql

#解压目录下的Data目录                                                       

# datadir = D:\soft\mysql\Data

#端口

# port = 3306

#server_id = ....

添加内容如下图:

添加环境变量

添加环境变量

​ MYSQL_HOME

变量值

​ MYSQL解压目录(D:\soft\mysql)

在Path结尾添加:

;%MYSQL_HOME%\bin;

开启服务,设置密码

管理员运行CMD,初始化MYSQL:

mysqld -initialize

安装MYSQL

mysqld -install

启动MYSQL服务

net start mysql

登陆

mysql -u root -p

回车跳过密码,选择数据库

Use mysql;

更改用户密码(后面的分号不能少)

update user set authentication_string=password('123') where user='root';

刷新

FLUSH PRIVILEGES;

退出MYSQL

quit

关闭MYSQL服务

Net stop mysql

关闭MYSQL验证跳过

打开my.ini,删除

#忽略登陆检查

skip_grant_tables

重启MYSQL服务

net start mysql

登陆

mysql -u root -p

输入密码123回车,如上图就证明配置好了。

转载请标明出处:MySQL 免安装版配置

作者:Niko

欢迎访问我的主页:vlins.cn

暂无评论

发送评论 编辑评论

|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇