修改配置文件

修改配置文件,添加skip-grant-tables,跳过授权表登录,重启服务

[root@localhost mysql]# vim /etc/my.cnf
[mysqld]
basedir = /usr/local/mysql
datadir = /opt/mysql_data
socket = /tmp/mysql.sock
port = 3306
pid-file = /opt/mysql_data/mysql.pid
user = mysql
skip-name-resolve
skip-grant-tables
[root@localhost mysql]# service mysqld restart
Shutting down MySQL.... SUCCESS!
Starting MySQL. SUCCESS!

进入数据库修改密码

mysql.user表中的authentication_string字段,老版本还需要修改password字段

[root@localhost mysql]# mysql
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 2
Server version: 5.7.33 MySQL Community Server (GPL)
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> update user set authentication_string = password('Ha153624....') where User = 'root' and Host = 'localhost';
Query OK, 1 row affected, 1 warning (0.01 sec)
Rows matched: 1  Changed: 1  Warnings: 1

修改配置文件

修改配置文件,删除skip-grant-tables,删除跳过授权表登录,重启服务

[root@localhost mysql]# vim /etc/my.cnf
[mysqld]
basedir = /usr/local/mysql
datadir = /opt/mysql_data
socket = /tmp/mysql.sock
port = 3306
pid-file = /opt/mysql_data/mysql.pid
user = mysql
skip-name-resolve
[root@localhost mysql]# service mysqld restart
Shutting down MySQL.... SUCCESS!
Starting MySQL. SUCCESS!
[root@localhost mysql]# mysql -uroot -pHa153624...
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 4
Server version: 5.7.33 MySQL Community Server (GPL)
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

mysql的密码破解相关推荐

  1. MySQL数据库密码破解

    研究MySQL数据库的加解密方式,在网络攻防过程中具有重要的意义:试想一旦获取了网站一定的权限后,如果能够获取MySQL中保存用户数据,通过解密后,即可通过正常途径来访问数据库:一方面可以直接操作数据 ...

  2. mysql数据库密码破解方法

    1.先找到到user.MYD文件. 所有的mysql系统用户的账号密码都存在这个文件里. 2.编辑器打开 这一串hash就是localhost@root的密码,注意破解的时候前面的*不要. 3.找个破 ...

  3. 05_MySQL笔记-配置文件-连接方式-密码破解-存储引擎-SQL语句分类

    文章目录 MySQL的配置文件 DBMS MySQL的连接方式 MySQL里密码破解 MySQL的存储引擎 SQL语句分类 个人博客 https://blog.csdn.net/cPen_web My ...

  4. Kali Linux渗透测试——密码破解

    笔记内容参考安全牛课堂苑房弘老师的Kali Linux渗透测试教程 当目标系统无任何已知漏洞时,可以考虑社会工程学或者获取目标系统的用户身份,通过合法账户登录绕过系统的安全防线.账户登录身份认证包括账 ...

  5. mysql数据库5.7版本二进制安装与破解mysql数据库密码

    mysql二进制安装与密码破解 文章目录 mysql二进制安装与密码破解 1:二进制安装 2:破解密码 1:二进制安装 进入包存放的路径 [root@localhost src]# cd /usr/s ...

  6. mysql数据库的密码破解/用户授权/备份/图形化管理工具phpmyadmin

    mysql数据库的密码破解/用户授权/备份/图形化管理工具phpmyadmin 1.数据库密码管理 a)数据库密码更改(知道数据库原密码) 实验步骤: 1)使用mysqladmin -u指定用户 -p ...

  7. mysql的二进制安装与备份与密码破解!!

    MySQL的安装! 1. 下载安装包! [root@lzz ~]# wget https://downloads.mysql.com/archives/get/p/23/file/mysql-5.7. ...

  8. linux环境MySQL密码破解

    密码破解 针对密码忘记的情况 1.如果是普通用户,可以让管理员授权(root) alter user 'cali'@'%' identified by 'xxxx'; 2.如果是超级用户 第1步:停止 ...

  9. ubuntu 破解mysql密码_Ubuntu下忘记MySQL root密码解决方法

    Linux下忘记MySQL root密码解决方法 忘了mysql密码,从网上找到的解决方案记录在这里. 编辑mysql的配置文件/etc/mysql/my.cnf,在[mysqld]段下加入一行&qu ...

最新文章

  1. 记录从数据库把数据初始化mongodb缓存的一些坑
  2. Mysql学习笔记(三)运算符和控制流函数
  3. c#与access建立连接用作登录_组态王与Access数据库的数据交换
  4. 工作量不断增加的微软Azure,正缩小与亚马逊AWS的差距
  5. Only Link: Inheritance — private and protected inheritance in c++
  6. python web中的并发请求
  7. Java定时任务原理
  8. creator找不到编译器 qt_Qt与Web混合开发(一)--简单使用
  9. Blocs 4 for Mac(可视化网页设计工具)
  10. httphandler防图片盗链
  11. Acrel-2000Z电力监控系统的应用
  12. (转)中华英才网竞品分析报告2016
  13. foxmail收取服务器邮件次数,Foxmail:如何设置收取历史邮件?
  14. 大数据人工智能时代的核心思维——数学建模
  15. Hadoop3.3.2+hbase2.4.10org.apache.hadoop.hbase.ipc.ServerNotRunningYetException: Server is not runn
  16. 大学计算机技巧讲座新闻稿,计算机科学与技术名家讲座系列报道(王希胤)
  17. 深度解读:阿里云视频直播功能升级
  18. 一战封神——提升奇珍提高战力
  19. 开源项目 ——API接口管理平台数据库原型设计(三)
  20. 玩客云pc端_玩客云电脑客户端-玩客云PC端 V1.4.5.112 免费安装版

热门文章

  1. 做一套给三星手机用的导航栏图标(伪装Windows10移动版)
  2. iPhont X适配
  3. 既是剧中人,亦是局外客
  4. 15支持哪些数据库版本 tfs_版本和支持的功能 - SQL Server 2016 | Microsoft Docs
  5. 对自己的大学期望与目标
  6. html自动移动滚动条,css如何实现div随滚动条移动?
  7. 百变郁锦香,开创新典范,深化全球战略布局成就国际高端酒店品质之选
  8. AT指令(中文详解版)(二)
  9. DPDK and XDP and ebpf
  10. stm32F105的Canable开源usb-can项目