解决mysql3534

报错如下

参照别的博主的博客:

先 mysqld -remove移除,

再 mysqld --initialize

再 mysqld install 

再 net start mysql

试了一遍失败了,想了一下从安装到现在到底哪里出错了,然后看到了这个博主的文章

https://blog.csdn.net/qq_28990603/article/details/80883497

所以我就改了一下我的my.ini的datadir目录,直接设置了个data,没用事先创建,再次运行上面的四个命令,就安装成功了。

本来还以为又要彻底删除mysql,重新安装了呢。

之前我这里设置的是我自己创建的mydata,就一直报错。至于为什么会自己创建的会报错,我也狠奇怪,总之现在好了

贴一下我的my.ini

[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:\development\mysql-8.0.17-winx64
datadir = D:\development\mysql-8.0.17-winx64\data
port = 3306
# 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 


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

安装成功后,data文件夹下有这些文件

在data下面搜索 .err搜到的文件打开 

 第一个文件打开,就能看到A temporary password is generated,冒号后面就是初始密码

后来的安装过程参考了这个博主的博客:

https://blog.csdn.net/weixin_44414527/article/details/88894127

 

好了,大家知道为什么的可以评论告诉我,谢谢~

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章