mysql8 安装启动报错

注意点1

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

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

[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:\tool\MYSQL\mysql-8.0.12-winx64\bin>mysqld --initialize --console
mysqld: Can't create/write to file 'D:  ool\MYSQL\mysql-8.0.12-winx64\data\is_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:\tool\MYSQL\mysql-8.0.12-winx64\bin\mysqld.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:\tool\MYSQL\mysql-8.0.12-winx64\bin\        ool\MYSQL\mysql-8.0.12-w
inx64\share\errmsg.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:\tool\MYSQL\mysql-8.0.12-winx64\bin\mysqld.exe: Shutdown complete (mysqld 8.0.12)  MySQL Community
 Server - GPL.

 

 

注意点2

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

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

  • 14
    点赞
  • 21
    收藏
    觉得还不错? 一键收藏
  • 7
    评论
通过引用可以看出,当使用yum安装mysql启动时,可能会出现 "MySQL Daemon failed to start" 的误信息。 要解决这个问题,可以参考引用,使用以下命令进行安装: ``` [root@localhost mysql# yum -y install mysql mysql-server --nogpgcheck ``` 此外,还可以参考引用中提到的在Linux 7平台上通过bash脚本自动部署mysql 5.7的方式来进行安装和管理。在使用脚本之前需要手动修改部署路径和数据库的版本号。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [yum安装mysql启动解决](https://blog.csdn.net/weixin_34104341/article/details/91766777)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [yum安装Mysql5.7 warning: /var/cache/yum/x86_64/7/mysql57-community/packages/mysql-community-libs...](https://blog.csdn.net/qq_55526713/article/details/126087628)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [通过bash脚本自动部署mysql5.7(yum without file move)](https://download.csdn.net/download/dber_ablewang/88275668)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值