当前位置:网站首页>mysql使用过程中遇到的问题
mysql使用过程中遇到的问题
2022-06-25 16:11:00 【牛右刀薛面】
1、问题描述
今早mysql还用着,下午再用的时候,就说我密码错误登不上去了。
但是我从来没有动过其他配置?
2、解决办法
这里我重装了mysql.如果你也没有重要数据的话可以这么干。如果有重要数据,先试着备份数据。
- 首先删除所有mysql 的依赖库
sudo pacman -R mysql libmysqlclient mysql-clients
- 然后删除mysql 的配置文件(先进入到超级用户界面)
cd /var/lib/mysql
rm -rf *
- 安装mysql
sudo pacman -S mysql
- 初始化mysql(这一步获得mysql初始密码)
sudo mysqld --initialize --user=mysql --basedir=/usr --datadir=/var/lib/mysql

- 重启mysql(注意,一定要先重启mysql)
sudo systemctl restart mysqld
- 登陆mysql(使用方才的初始密码)
mysql -u root -p

- 修改密码
进入mysql以后,重置密码。
我真的谢谢,因为没有重启那一步,我弄了几十遍。。。
边栏推荐
- Overall MySQL architecture and statement execution process
- 一个 TDD 示例
- Blue Bridge Cup - practice system login
- Optimization of lazyagg query rewriting in parsing data warehouse
- 心樓:華為運動健康的七年築造之旅
- Day_ 05
- Optimization of lazyagg query rewriting in parsing data warehouse
- Mysql database multi table query
- 【精通高并发】深入理解汇编语言基础
- Function and implementation of closures
猜你喜欢

深入浅出对话系统——自己实现Transformer

DOM event flow, event delegate

完美洗牌问题

Record learning of hystrix knowledge --20210929

3. conditional probability and independence

Learning notes of rxjs takeuntil operator

Wireshark网卡无法找到或没有显示的问题

Dino: Detr with improved detecting anchor boxes for end to end object detection

Optimization of lazyagg query rewriting in parsing data warehouse

使用hbuilder X创建uniapp项目
随机推荐
Unity技术手册 - 生命周期旋转RotationOverLifetime-速度旋转RotationBySpeed-外力ExternalForces
論文筆記:LBCF: A Large-Scale Budget-Constrained Causal Forest Algorithm
Day_ fifteen
ncnn源码学习全集
使用hbuilder X创建uniapp项目
【蓝桥杯集训100题】scratch指令移动 蓝桥杯scratch比赛专项预测编程题 集训模拟练习题第14题
_ 19_ IO stream summary
_ 17 collection overview
Reading mysql45 lecture - index continued
pychrm的这些配置,你都知道吗?
GridLayout evenly allocate space
cmd。。。。。。
Alvaria宣布客户体验行业资深人士Jeff Cotten担任新首席执行官
[Third Party framework] retrofit2 (1) of network request framework -- Getting Started Guide
DOM event flow, event delegate
八种button的hover效果
[problem solving] dialogfragment can not be attached to a container view
Beginner bug set
Day_ 18 hash table, generic
Common APIs and exception mechanisms