欢迎来到代码驿站!

Mysql

当前位置:首页 > 数据库 > Mysql

mysql 8.0.13 安装配置方法图文教程

时间:2021-01-15 11:12:38|栏目:Mysql|点击:

本文为大家分享了mysql 8.0.13 安装配置教程,供大家参考,具体内容如下

下载

下载地址

解压

解压之后没有my.ini文件(我的端口设置的3308),截图中是我增加的

[client]
port = 3308
default-character-set = utf8
 
[mysqld]
port = 3308
character_set_server = utf8
 
basedir=D:\MySQL\mysql-8.0.13-winx64
datadir=D:\MySQL\mysql-8.0.13-winx64\data
 
group_concat_max_len=20000
 
 
[WinMySQLAdmin]
D:\MySQL\mysql-8.0.13-winx64\bin\mysqld.exe

管理员命令行

在MySQL安装目录的 bin 目录下执行命令:

mysqld --initialize --console

得到如下结果

D:\MySQL\mysql-8.0.13-winx64\bin>mysqld --initialize --console
2018-10-24T05:32:45.732454Z 0 [System] [MY-013169] [Server] D:\MySQL\mysql-8.0.13-winx64\bin\mysqld.exe (mysqld 8.0.13) initializing of server in progress as process 43080
2018-10-24T05:32:45.870611Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2018-10-24T05:33:14.879343Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: MMQP.YfCy5XY
2018-10-24T05:33:37.812581Z 0 [System] [MY-013170] [Server] D:\MySQL\mysql-8.0.13-winx64\bin\mysqld.exe (mysqld 8.0.13) initializing of server has completed
 
D:\MySQL\mysql-8.0.13-winx64\bin>

看到有个警告,查了一下mysql建议使用utf8mb4

修改my.ini文件

[client]
port = 3308
default-character-set = UTF8MB4 
 
[mysqld]
port = 3308
character-set-server = UTF8MB4 
 
basedir=D:\MySQL\mysql-8.0.13-winx64
datadir=D:\MySQL\mysql-8.0.13-winx64\data
 
group_concat_max_len=20000
 
 
[WinMySQLAdmin]
D:\MySQL\mysql-8.0.13-winx64\bin\mysqld.exe

警告没有了

D:\MySQL\mysql-8.0.13-winx64\bin>mysqld --initialize --console
2018-10-24T06:06:51.100372Z 0 [System] [MY-013169] [Server] D:\MySQL\mysql-8.0.13-winx64\bin\mysqld.exe (mysqld 8.0.13) initializing of server in progress as process 47804
2018-10-24T06:07:18.372699Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: nj>uUJkpH4/I
2018-10-24T06:07:36.024435Z 0 [System] [MY-013170] [Server] D:\MySQL\mysql-8.0.13-winx64\bin\mysqld.exe (mysqld 8.0.13) initializing of server has completed
 
D:\MySQL\mysql-8.0.13-winx64\bin>

上面打印了默认密码:nj>uUJkpH4/I

安装服务

mysqld --install MySQL8.0

因为这是电脑上第二个mysql 所以服务名改成了 MySQL8.0

启动服务

net start MySQL8.0

修改初始密码

登录mysql之后执行

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';

精彩专题分享:

mysql不同版本安装教程

mysql5.7各版本安装教程

mysql5.6各版本安装教程

mysql8.0各版本安装教程

上一篇:简单整理MySQL的日志操作命令

栏    目:Mysql

下一篇:MySQL使用全库备份数据恢复单表数据的方法

本文标题:mysql 8.0.13 安装配置方法图文教程

本文地址:http://www.codeinn.net/misctech/45436.html

推荐教程

广告投放 | 联系我们 | 版权申明

重要申明:本站所有的文章、图片、评论等,均由网友发表或上传并维护或收集自网络,属个人行为,与本站立场无关。

如果侵犯了您的权利,请与我们联系,我们将在24小时内进行处理、任何非本站因素导致的法律后果,本站均不负任何责任。

联系QQ:914707363 | 邮箱:codeinn#126.com(#换成@)

Copyright © 2020 代码驿站 版权所有