如何破解MariaDB5.5数据库的root登录密码

未分类   2024年05月09日 21:07  

这篇文章将为大家详细讲解有关如何破解MariaDB5.5数据库的root登录密码,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。

[root@localhost~]#mysql-uroot-p123 忘记 root 登录密码

ERROR1045(28000):Accessdeniedforuser'root'@'localhost'(usingpassword:YES)

查找并运行 mysqld_safe 程序绕开 MariaDB5.5 数据库密码验证

[root@localhost~]#find/-namemysqld_safe/usr/bin/mysqld_safe[root@localhost~]#/usr/bin/mysqld_safe--skip-grant-tables&

直接使用 mysql命令登录 MariaDB5.5 数据库并修改 root 登录密码

[root@localhost~]#mysqlWelcometotheMariaDBmonitor.Commandsendwith;or\g.YourMariaDBconnectionidis1Serverversion:5.5.52-MariaDBMariaDBServerCopyright(c)2000,2016,Oracle,MariaDBCorporationAbandothers.Type'help;'or'\h'forhelp.Type'\c'toclearthecurrentinputstatement.MariaDB[(none)]>showdatabases;+--------------------+|Database|+--------------------+|information_schema||mysql||performance_schema|+--------------------+3rowsinset(0.00sec)MariaDB[(none)]>usemysql;ReadingtableinformationforcompletionoftableandcolumnnamesYoucanturnoffthisfeaturetogetaquickerstartupwith-ADatabasechangedMariaDB[mysql]>UPDATEuserSETpassword=password("New-password")WHEREuser='root';QueryOK,3rowsaffected(0.00sec)Rowsmatched:3Changed:3Warnings:0MariaDB[mysql]>flushprivileges;QueryOK,0rowsaffected(0.00sec)MariaDB[mysql]>exitBye

使用新密码 New-password 登录 MariaDB5.5 数据库

[root@localhost~]#psauUSERPID%CPU%MEMVSZRSSTTYSTATSTARTTIMECOMMANDroot39860.00.11153802084tty1Ss+19:530:02-bashroot224830.00.11153842076pts/0Ss21:540:00-bashroot229100.00.01132521592pts/0S21:590:00/bin/sh/usr/bin/mysqld_safe--skimysql230660.34.683926886192pts/0Sl21:590:00/usr/libexec/mysqld--basedir=/usrroot230910.00.01510561824pts/0R+22:000:00psau[root@localhost~]#kill-922910[root@localhost~]#mysql-uroot-pNew-passwordWelcometotheMariaDBmonitor.Commandsendwith;or\g.YourMariaDBconnectionidis2Serverversion:5.5.52-MariaDBMariaDBServerCopyright(c)2000,2016,Oracle,MariaDBCorporationAbandothers.Type'help;'or'\h'forhelp.Type'\c'toclearthecurrentinputstatement.MariaDB[(none)]>MariaDB[(none)]>showdatabases;+--------------------+|Database|+--------------------+|information_schema||mysql||performance_schema|+--------------------+3rowsinset(0.00sec)MariaDB[(none)]>exitBye[1]+Killed/usr/bin/mysqld_safe--skip-grant-tables

使用其他密码不能登录 MariaDB5.5 数据库

[root@localhost~]#mysql-uroot-pNew-passworddERROR1045(28000):Accessdeniedforuser'root'@'localhost'(usingpassword:YES)[root@localhost~]#rpm-qamariadbmariadb-5.5.52-1.el7.x86_64

关于如何破解MariaDB5.5数据库的root登录密码就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。

域名注册
购买VPS主机

您或许对下面这些文章有兴趣:                    本月吐槽辛苦排行榜

  • 没有相关文章!
看贴要回贴有N种理由!看帖不回贴的后果你懂得的!


评论内容 (*必填):
(Ctrl + Enter提交)   

部落快速搜索栏

各类专题梳理

网站导航栏

X
返回顶部