最新-Window安装mysql8
下载mysql
解压到当前目录
添加my.ini
配置如下:
-
[client]
-
# 设置mysql客户端默认字符集
-
default-character-set=UTF8MB4
-
-
[mysqld]
-
# 设置3306端口
-
port = 3306
-
# 设置mysql的安装目录
-
basedir=E:\\software\mysql-8.0.29-winx64
-
# 设置 mysql数据库的数据的存放目录,MySQL 8+ 不需要以下配置,系统自己生成即可,否则有可能报错
-
#datadir=E:\software\mysql-8.0.29-winx64\data
-
# 允许最大连接数
-
max_connections=20
-
# 服务端使用的字符集默认为8比特编码的latin1字符集
-
character-set-server=UTF8MB4
-
# 创建新表时将使用的默认存储引擎
-
default-storage-engine=INNODB
安装过程中如下问题:
mysqld: Can't create directory 'E:\software\mysql-8.0.29-winx64\bin\ oftware\mysql-8.0.29-winx64\data\' (OS errno 2 - No such file or directory)
2022-05-01T00:52:29.058790Z 0 [System] [MY-013169] [Server] E:\software\mysql-8.0.29-winx64\bin\mysqld.exe (mysqld 8.0.29) initializing of server in progress as process 12912
2022-05-01T00:52:29.058854Z 0 [ERROR] [MY-010338] [Server] Can't find error-message file 'E:\software\mysql-8.0.29-winx64\bin\ oftware\mysql-8.0.29-winx64\share\errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
2022-05-01T00:52:29.060741Z 0 [ERROR] [MY-013236] [Server] The designated data directory E:\software\mysql-8.0.29-winx64\bin\ oftware\mysql-8.0.29-winx64\data\ is unusable. You can remove all files that the server added to it.
2022-05-01T00:52:29.078363Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-05-01T00:52:29.080035Z 0 [System] [MY-010910] [Server] E:\software\mysql-8.0.29-winx64\bin\mysqld.exe: Shutdown complete (mysqld 8.0.29) MySQL Community Server - GPL.
仔细看上面的my.ini,
安装成功
启动mysql 服务
net start mysql
登录mysql
.\mysql -h 127.0.0.1 -u root -p
Workbench下载安装
文章来源: blog.csdn.net,作者:隔壁老瓦,版权归原作者所有,如需转载,请联系作者。
原文链接:blog.csdn.net/wxb880114/article/details/124522627
- 点赞
- 收藏
- 关注作者
评论(0)