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密碼
- 帝國cms密碼忘記,帝國cms網站忘記登陸賬號密碼密碼網站
- win10 登入密碼忘記了怎麼解決_win10 登入密碼忘了怎麼辦Win10密碼
- 電腦win10系統登陸密碼忘記了怎麼辦_win10安全登入密碼忘記了如何解決Win10密碼
- 忘記Windows XP登入密碼的9種解決辦法(轉)Windows密碼
- cobbler 忘記好系統登入密碼,如何修改cobbler部署機器的預設密碼密碼
- 【2024有效】WordPress忘記密碼找回登入密碼的最簡單有效的方法密碼
- mysql 忘記密碼MySql密碼
- MySQL忘記密碼MySql密碼
- windows10系統下安全登入密碼忘記了如何解決Windows密碼
- mysql 忘記密碼,mysql修改密碼MySql密碼
- 密碼登入密碼
- Oracle忘記密碼找回Oracle密碼
- ORACLE 忘記SYS密碼Oracle密碼
- mysql忘記root密碼MySql密碼
- Linux 忘記密碼Linux密碼
- ubuntu密碼正確,卻不能登入圖形介面Ubuntu密碼
- SSH 遠端登入「記住密碼」密碼
- MYSQL修改密碼和忘記ROOT密碼MySql密碼
- 寶塔登入密碼忘記怎麼辦_寶塔linux皮膚命令大全密碼Linux
- jenkins忘記管理員登陸密碼的補救措施Jenkins密碼
- 帝國CMS忘記後臺登陸密碼怎麼辦?密碼
- 帝國cms,忘記後臺登陸密碼怎麼辦?密碼
- PDF密碼忘記了,如何找回口令密碼密碼
- 群暉NAS忘記密碼如何重置密碼密碼
- PbootCMS忘記密碼後的重置密碼流程boot密碼
- Ubuntu ssh伺服器拒絕密碼(使用root登入)Ubuntu伺服器密碼
- 如何設定 Ubuntu 14.04 的 SSH 無密碼登入Ubuntu密碼
- mysql 5.7忘記root密碼MySql密碼
- mysql root 密碼忘記windowsMySql密碼Windows
- [Mysql]mysql忘記ROOT密碼MySql密碼
- 又忘記銀行密碼密碼
- Linux忘記root密碼Linux密碼
- aix下忘記root密碼AI密碼