mysql8 安装启动报错[通俗易懂]

2022-07-30 09:43:38 浏览数 (1)

大家好,又见面了,我是你们的朋友全栈君。

注意点1

my.ini配置,其中这两项一定要按这个格式,双引号及双反斜杠,否则初始化时会报下面的错

basedir = “D:\tool\MYSQL\mysql-8.0.12-winx64” datadir = “D:\tool\MYSQL\mysql-8.0.12-winx64\data”

代码语言:javascript复制
[mysqld]
# 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:\tool\MYSQL\mysql-8.0.12-winx64"
datadir = "D:\tool\MYSQL\mysql-8.0.12-winx64\data"
port = 3307
# server_id = .....


# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M 

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 

character-set-server = utf8mb4

performance_schema_max_table_instances = 600
table_definition_cache = 400
table_open_cache = 256

[mysql]
default-character-set = utf8mb4

[client]
default-character-set = utf8mb4

D:toolMYSQLmysql-8.0.12-winx64bin>mysqld –initialize –console mysqld: Can’t create/write to file ‘D: oolMYSQLmysql-8.0.12-winx64datais_writable’ (OS errno 2 – No such file or directory) 2018-09-19T01:51:48.238868Z 0 [Warning] [MY-010915] [Server] ‘NO_ZERO_DATE’, ‘NO_ZERO_IN_DATE’ and ‘ERROR_FOR_DIVISION_BY_ZERO’ sql modes should be used with strict mode. They will be merged with strict mode in a future release. 2018-09-19T01:51:48.243868Z 0 [System] [MY-013169] [Server] D:toolMYSQLmysql-8.0.12-winx64binmysqld.exe (mysqld 8.0.12) initializing of server in progress as process 8492 2018-09-19T01:51:48.243868Z 0 [ERROR] [MY-010338] [Server] Can’t find error-message file ‘D:toolMYSQLmysql-8.0.12-winx64bin oolMYSQLmysql-8.0.12-w inx64shareerrmsg.sys’. Check error-message file location and ‘lc-messages-dir’ configuration directive. 2018-09-19T01:51:48.246869Z 0 [ERROR] [MY-010460] [Server] –initialize specified but the data directory exists and is not writable. Aborting. 2018-09-19T01:51:48.248869Z 0 [ERROR] [MY-010119] [Server] Aborting 2018-09-19T01:51:48.249869Z 0 [System] [MY-010910] [Server] D:toolMYSQLmysql-8.0.12-winx64binmysqld.exe: Shutdown complete (mysqld 8.0.12) MySQL Community Server – GPL.

注意点2

如果mysql 启动时卡住,再次启动或者停止时会提示:服务正在启动或停止中,请稍候片刻后再试一次。

但进程中确找不到mysqld的进程,是因为未勾选“显示所有用户的进程”

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/129359.html原文链接:https://javaforall.cn

0 人点赞