mysql 多實例密碼破解

來源:本站原創 Linux 超過550 views圍觀 0條評論

適用于環境的

1.停止相應實例

/usr/bin/mysqld_multi –defaults-extra-file=/etc/mysql/cfg3309.cnf –log=/var/log/mysql/mysql_3309.log stop

2.修改相應實例配置文件

[mysqld3309]
skip-grant-tables? #增加一條跳過權限檢測
“/etc/mysql/cfg3309.cnf” 39L, 1682C

3.開啟實例

4.登錄修改密碼
[[email protected] tmp]# mysql -S /tmp/mysql3309.sock
Welcome to the MariaDB monitor.? Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 5.5.56-MariaDB MariaDB Server

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

MariaDB [(none)]>
MariaDB [(none)]>
MariaDB [(none)]>
MariaDB [(none)]> update mysql.user set password = password(“我是密碼”) where user = ‘root’ and host = ‘localhost’;

mysql 5.7?命令

update mysql.user set authentication_string=password(‘232r’) where user=’root’ and Host = ‘localhost’;

Query OK, 1 row affected, 1 warning (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 1

mysql>
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
5.還原配置
6.重啟

網上找的 實際沒掉用

killall mysqld
mysqld_safe –default-file=/data/3306/my.cnf –skip-grant-table &??? –skip-grant-table放置在后面
mysql -uroot -p -S /data/3306/mysql.sock 登錄密碼為空
修改密碼 update mysql.user set password = password(“123456”) where user = ‘root’ and host = ‘localhost’;
flush privileges;

文章出自:CCIE那點事 http://www.qdxgqk.live/ 版權所有。本站文章除注明出處外,皆為作者原創文章,可自由引用,但請注明來源。 禁止全文轉載。
本文鏈接:http://www.qdxgqk.live/?p=3576轉載請注明轉自CCIE那點事
如果喜歡:點此訂閱本站
?
?
萌宠夺宝游戏 20选5复式中奖计算表 时时彩缩水工具手机端 爬虫工具能赚钱吗 大乐透125期历史记录 四川时时彩 足彩进球彩一千万 贵州快三开奖 沈阳麻将飘胡图解 福彩山西快乐十分开奖彩票控 nba比分网188 2017最新六合图库资料 浙体彩20选5走势图 江西铜业股票分析2018 微信玩5毛麻将有挂吗 极速飞艇 3d开机号近十期号码