Ubuntu 忘記 phpMyAdmin 登入密碼
Ubuntu 忘記 phpMyAdmin 登入密碼
關於phpMyAdmin
phpMyAdmin is a free software tool written in PHP, intended to handle the administration of MySQL over the Web. phpMyAdmin supports a wide range of operations on MySQL and MariaDB. Frequently used operations (managing databases, tables, columns, relations, indexes, users, permissions, etc) can be performed via the user interface, while you still have the ability to directly execute any SQL statement.
0X00 找到my.cnf檔案
登入ubuntu系統,找到檔案:my.cnf,一般來說檔案的位置為:/etc/mysql/my.cnf
,如不存在,建議在系統直接查詢locate my.cnf | grep cnf
:
root@ubuntu:/# locate my.cnf | grep cnf
/etc/mysql/my.cnf
0x01 跳過
使用vim /etc/mysql/my.cnf
在[mysqld]
目錄下加上一句skip-grant-tables
,使用鍵盤ESC
退出,然後輸入wq
儲存!
[mysqld]
#
# * Basic Settings
#
skip-grant-tables
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
0x02 重啟
使用命令 service mysql restart
重啟mysql服務
root@ubuntu:/# service mysql restart
mysql stop/waiting
mysql start/running, process 3978
0x03 設定賬號密碼
輸入mysql
進入,重新設定賬號密碼update mysql.user set password=password('jidd@u123.') where user='root';
之後在重新整理許可權flush privileges
root@ubuntu:/# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 38
Server version: 5.5.54-0ubuntu0.12.04.1 (Ubuntu)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
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>
我這裡設定密碼為jidd@u123.
mysql> update mysql.user set password=password('jidd@u123.') where user='root';
Query OK, 4 rows affected (0.00 sec)
Rows matched: 4 Changed: 4 Warnings: 0
重新整理許可權
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
0x04 實現正常登入
終端實現正常登入
root@ubuntu:/# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 38
Server version: 5.5.54-0ubuntu0.12.04.1 (Ubuntu)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
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.
web頁面的登入
0X05 完成密碼修改
最後不要忘記重複使用vim /etc/mysql/my.cnf
在[mysqld]
目錄下注釋掉:#skip-grant-tables
,使用鍵盤ESC
退出,輸入wq
儲存!然後重啟service mysql restart
,希望能夠幫到你解決問題。
相關文章
- PbootCMS忘記登入密碼怎麼辦?忘記了PBootCMS後臺的登入密碼boot密碼
- 直播原始碼,zabbix忘記登入密碼原始碼密碼
- PbootCMS後臺登陸密碼忘記/找回密碼後臺登入密碼外掛boot密碼
- PbootCMS後臺登陸密碼忘記/找回後臺登入密碼外掛boot密碼
- 想登入寶塔皮膚但是忘記密碼_寶塔密碼忘記了怎麼辦密碼
- SQL Server 禁用Windows身份登入時忘記其他賬號如sa登入密碼後重置密碼SQLServerWindows密碼
- 帝國cms密碼忘記,帝國cms網站忘記登陸賬號密碼密碼網站
- 【2024有效】WordPress忘記密碼找回登入密碼的最簡單有效的方法密碼
- win10 登入密碼忘記了怎麼解決_win10 登入密碼忘了怎麼辦Win10密碼
- 電腦win10系統登陸密碼忘記了怎麼辦_win10安全登入密碼忘記了如何解決Win10密碼
- cobbler 忘記好系統登入密碼,如何修改cobbler部署機器的預設密碼密碼
- mysql 忘記密碼MySql密碼
- Linux 忘記密碼Linux密碼
- MySQL忘記密碼MySql密碼
- windows10系統下安全登入密碼忘記了如何解決Windows密碼
- 密碼登入密碼
- 寶塔登入密碼忘記怎麼辦_寶塔linux皮膚命令大全密碼Linux
- ubuntu密碼正確,卻不能登入圖形介面Ubuntu密碼
- SSH 遠端登入「記住密碼」密碼
- 帝國cms,忘記後臺登陸密碼怎麼辦?密碼
- 帝國CMS忘記後臺登陸密碼怎麼辦?密碼
- PbootCMS忘記密碼後的重置密碼流程boot密碼
- 群暉NAS忘記密碼如何重置密碼密碼
- PDF密碼忘記了,如何找回口令密碼密碼
- Ubuntu ssh伺服器拒絕密碼(使用root登入)Ubuntu伺服器密碼
- mysql 5.7忘記root密碼MySql密碼
- Weblogic忘記控制檯密碼Web密碼
- kali 忘記賬戶密碼密碼
- 07 . Jenkins忘記root密碼Jenkins密碼
- Linux系統密碼忘記Linux密碼
- win10 系統登入密碼忘記了怎麼辦_win10忘了開機密碼怎麼辦Win10密碼
- 直播app原始碼,登入時自動輸入密碼/自動記住密碼APP原始碼密碼
- 寶塔找回密碼:忘記密碼怎麼辦?密碼
- excel密碼忘記了怎麼解鎖 excel忘記密碼怎樣簡單找回Excel密碼
- win10平板忘記密碼如何解碼_平板win10忘記密碼強制重置Win10密碼
- phpMyAdmin重置WordPress管理員密碼PHP密碼
- MySQL 8.0.15忘記密碼重置方法MySql密碼
- mysql忘記密碼解決方案MySql密碼