好久没用mysql,出现好多问题

0,删data文件
1,mysqld --initialize --console
初始化mysql
2,net start mysql
启动
3,mysql -uroot -p
4,输入刚刚的随机密码
5,ALTER USER ‘root’@‘localhost’ IDENTIFIED BY ‘123456’;
改密码

services.msc打开服务,看是不是没启动

D:\mysql-8.0.26-winx64\mysql-8.0.26-winx64\bin>mysqld --console
2023-02-21T12:50:32.484621Z 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.
2023-02-21T12:50:32.485609Z 0 [System] [MY-010116] [Server] D:\mysql-8.0.26-winx64\mysql-8.0.26-winx64\bin\mysqld.exe (mysqld 8.0.26) starting as process 5224
2023-02-21T12:50:32.489898Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2023-02-21T12:50:32.529810Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-02-21T12:50:32.536974Z 1 [ERROR] [MY-012271] [InnoDB] The innodb_system data file 'ibdata1' must be writable
2023-02-21T12:50:32.537359Z 1 [ERROR] [MY-012278] [InnoDB] The innodb_system data file 'ibdata1' must be writable
2023-02-21T12:50:32.558315Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2023-02-21T12:50:32.559801Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2023-02-21T12:50:32.560960Z 0 [ERROR] [MY-010119] [Server] Aborting
2023-02-21T12:50:32.570331Z 0 [System] [MY-010910] [Server] D:\mysql-8.0.26-winx64\mysql-8.0.26-winx64\bin\mysqld.exe: Shutdown complete (mysqld 8.0.26)  MySQL Community Server - GPL.
D:\mysql-8.0.26-winx64\mysql-8.0.26-winx64\bin>mysql -u root -p
Enter password: ******
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost:3306' (10061)

D:\mysql-8.0.26-winx64\mysql-8.0.26-winx64\bin>mysql -u root -p
Enter password: ******
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

D:\mysql-8.0.26-winx64\mysql-8.0.26-winx64\bin>mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

D:\mysql-8.0.26-winx64\mysql-8.0.26-winx64\bin>mysql -u root -p 111111
Enter password: ******
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值