忘記mysql數(shù)據(jù)庫密碼怎么辦?-創(chuàng)新互聯(lián)

一、破解mysql數(shù)據(jù)庫密碼步驟

成都創(chuàng)新互聯(lián)公司主營韶關(guān)網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營網(wǎng)站建設(shè)方案,App定制開發(fā),韶關(guān)h5成都小程序開發(fā)搭建,韶關(guān)網(wǎng)站營銷推廣歡迎韶關(guān)等地區(qū)企業(yè)咨詢

1、修改mysql配置文件/etc/my.cnf

[mysqld] port        = 3306 socket      = /tmp/mysql.sock skip-external-locking key_buffer_size = 256M max_allowed_packet = 1M table_open_cache = 256 sort_buffer_size = 1M read_buffer_size = 1M read_rnd_buffer_size = 4M myisam_sort_buffer_size = 64M thread_cache_size = 8 query_cache_size= 16M # Try number of CPU's*2 for thread_concurrency thread_concurrency = 2 datadir = /mydata/data skip-grant-tables  #加入此項

2、重新啟動mysqld

# /etc/init.d/mysqld restart  Stopping MySQL: [ OK ]  Starting MySQL: [ OK ]

3.登錄并修改MySQL的root密碼

# /usr/bin/mysql  Welcome to the MySQL monitor. Commands end with ; or \g.  Your MySQL connection id is 3 to server version: 3.23.56  Type 'help;' or '\h' for help. Type '\c' to clear the buffer.  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 Password = password ( 'new-password' ) WHERE User = 'root' ;  Query OK, 0 rows affected (0.00 sec)  Rows matched: 2 Changed: 0 Warnings: 0  mysql> flush privileges ;  Query OK, 0 rows affected (0.01 sec)  mysql> quit  Bye

5.將MySQL的登錄設(shè)置修改回來

# vi /etc/my.cnf  將剛才在[mysqld]的段中加上的skip-grant-tables刪除  保存并且退出vi。

6.重新啟動mysqld

# /etc/init.d/mysqld restart Stopping MySQL: [ OK ] Starting MySQL: [ OK ]

圖示:


修改如下:

忘記mysql數(shù)據(jù)庫密碼怎么辦?

重設(shè)密碼:

忘記mysql數(shù)據(jù)庫密碼怎么辦?

另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機、免備案服務(wù)器”等云主機租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。

網(wǎng)站題目:忘記mysql數(shù)據(jù)庫密碼怎么辦?-創(chuàng)新互聯(lián)
網(wǎng)址分享:http://bm7419.com/article36/hdesg.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供商城網(wǎng)站、服務(wù)器托管、搜索引擎優(yōu)化、品牌網(wǎng)站設(shè)計、響應(yīng)式網(wǎng)站、網(wǎng)站制作

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

成都定制網(wǎng)站網(wǎng)頁設(shè)計