当前位置:网站首页>[solved] after referring to the local MySQL and forgetting the password, [server] --initialize specified but the data directory has files in it Aborti
[solved] after referring to the local MySQL and forgetting the password, [server] --initialize specified but the data directory has files in it Aborti
2022-07-19 02:35:00 【Tamarind_】
Local installation mysql after , Forgot the password , So I found the following article :
https://www.jb51.net/article/215881.htm
The above two connections are used in combination , It can be completely solved under normal circumstances .
But to perform mysqld --initialize --user=mysql --console when , Normally, it should initialize mysql The default password for , But I encountered the following situation :
D:\workSoftWare\anzhuang\mysql-8.0.21-winx64\bin>mysqld --initialize --user=mysql --console
2022-05-07T07:55:57.563900Z 0 [System] [MY-013169] [Server] D:\workSoftWare\anzhuang\mysql-8.0.21-winx64\bin\mysqld.exe (mysqld 8.0.21) initializing of server in progress as process 20852
2022-05-07T07:55:57.565525Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting.
2022-05-07T07:55:57.565534Z 0 [ERROR] [MY-013236] [Server] The designated data directory D:\workSoftWare\anzhuang\mysql-8.0.21-winx64\data\ is unusable. You can remove all files that the server added to it.
2022-05-07T07:55:57.566776Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-05-07T07:55:57.567065Z 0 [System] [MY-010910] [Server] D:\workSoftWare\anzhuang\mysql-8.0.21-winx64\bin\mysqld.exe: Shutdown complete (mysqld 8.0.21) MySQL Community Server - GPL.
【 Solution 】
Obviously wrong . So I checked the wrong content , Because
①mysql In the installation package ,my.ini Files to be placed in bin Under the folder ;
② May be because data I created the folder manually , There was an error in the file in the initial installation ;
The first time it was installed , A certain Don't create it yourself data Folder ,data Folder is execution install Created automatically when ! So I deleted data Folder ( You can also try deleting only data Contents of the folder ).
Here are the current installation files
When you execute it again , Successfully initialized
Log in to mysql Yes, you can log in ~
After the initialization , Need to change password , Otherwise, the following errors will occur
Change user password
alter user 'root'@'localhost' identified by 'youpassword';
Refresh the permissions
flush privileges;
After modification , You can use the new password to execute
边栏推荐
- Visual studio 2019-qt debugging
- Stl--queue container
- Cocoon breaking and rebirth of 3D NFT: caduceus decentralized edge rendering technology
- Injection de modèles ssti
- D - parity game discretization + weighted union search set
- STL -- vector container
- Project Performance Optimization Practice: solve the white screen problem of the home page, customize the loading animation to optimize the first screen effect
- CTFHub----RCE
- Inverse yuan (I'll add these words if there are too many people using the name)
- 流量回放工具gor使用经验
猜你喜欢
Project Performance Optimization Practice: solve the white screen problem of the home page, customize the loading animation to optimize the first screen effect
Logical vulnerability - authentication vulnerability
逆元(名字太多人用我就加这几个字)
Summary of tree and heap knowledge points
Inverse yuan (I'll add these words if there are too many people using the name)
Buaaos-lab0 experimental report
【Unity开发小技巧】Unity混音器Mixer控制全局音量
[unity development tips] unity packs the EXE on the PC side and compresses and packs it into an EXE file
STL -- stack container
静态路由(详)
随机推荐
静态路由(详)
[hdrp HD rendering pipeline] create hdrp project and upgrade the built-in pipeline project to hdrp project
2022 latest software testing tools
Bugku problem solution
逻辑漏洞----身份验证漏洞
【Unity编辑器扩展】快速定位资源和脚本的指定文件和路径
脏读、幻读、不可重复读
网络层协议和IP数据包的格式(详解)
In depth performance test data analysis
【Antv G2】折线图如何添加点击事件(点击任意位置即可获取折线上点的值)
使用JMeter测试基于WebSocket协议的服务
[unity panel attribute literacy] set texture import settings after importing textures
VLAN and trunk port configuration
SSTI template injection
If a hunter shoots a rabbit with a gun
[unity Editor Extension] scriptableobject for internal asset configuration of unity
简单的用例编写规范
STL -- deque container
接口(Collection/Map)- 各接口的实现与对比
STL -- List container (linked list)