CentOS忘记root用户密码的解决方法
发表于:2024-10-23 作者:千家信息网编辑
千家信息网最后更新 2024年10月23日,1、没有输入或输入错误的root用户密码,无法进入数据库:# mysql -uroot -p(1)没有输入root用户密码,直接回车:(2)输入错误的root用户密码:2、强制结束MySQL进程:#
千家信息网最后更新 2024年10月23日CentOS忘记root用户密码的解决方法
1、没有输入或输入错误的root用户密码,无法进入数据库:
# mysql -uroot -p
(1)没有输入root用户密码,直接回车:
(2)输入错误的root用户密码:
2、强制结束MySQL进程:
# yum -y install psmisc
# killall mysqld
# pkill mysqld
# ps -ef | grep mysql
# ss -tunlp | grep 3306
3、使用mysqld命令,增加--skip-grant-tables参数,跳过权限表,启动数据库:
# mysqld --defaults-file=/etc/my.cnf --user=mysql --skip-grant-tables &
# ps -ef | grep mysql
# ss -tunlp | grep 3306
4、使用mysql命令直接进入数据库,为root用户设置新的密码并刷新权限:
# mysql
mysql> use mysql;
mysql> update user set authentication_string=password('root@1234') where user='root';
mysql> flush privileges;
5、重启数据库:
# killall mysqld
# pkill mysqld
# ps -ef | grep mysql
# ss -tunlp | grep 3306
# systemctl start mysqld
6、输入root用户新设置的密码root@1234,进入数据库:
# mysql -uroot -p
密码
用户
数据
数据库
输入
命令
权限
错误
参数
进程
新设
强制
方法
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
网络技术需要实践的内容
泽州网络安全员
视觉检测软件开发步骤流程
游戏软件开发属于动漫软件吗
2018年网络安全方案
全球网络安全实时排名查询
主城服务器哪个好
对于网络安全犯罪的正确认识
系统升级后总是显示数据库异常
musql数据库查询用什么语句
服务器 网络设备管理规范
公司网络安全风险评估报告
数据库创建的默认密码是什么
远离网吧预防网络安全手抄报
华为云存储服务器报价
棋牌软件开发起来 好推广么
交通网络安全建设
手机云服务器安全吗
休闲棋牌app软件开发多少钱
软件密码怎么在数据库修改
软件开发的v模型是指
idc服务器销售
计算机网络安全管理进度安排
图数据库第二版电子书
wow正式服人最多的服务器
最新国外代理服务器免费
易邀网络技术有限公司
tp5连接远程数据库慢
宁夏戴尔服务器维修调试哪家便宜
计算机网络技术会计选哪个