久久精品人人爽,华人av在线,亚洲性视频网站,欧美专区一二三

mysql 中怎么修改root密碼

共計(jì) 1068 個(gè)字符,預(yù)計(jì)需要花費(fèi) 3 分鐘才能閱讀完成。

mysql 中怎么修改 root 密碼,相信很多沒有經(jīng)驗(yàn)的人對(duì)此束手無策,為此本文總結(jié)了問題出現(xiàn)的原因和解決方法,通過這篇文章希望你能解決這個(gè)問題。

Method 1:
在 /usr/local//bin/ 下:
./mysqladmin -u root password new_password
一般安裝時(shí)用此方法設(shè)置。

Method 2:

在 mysql 狀態(tài)下:
mysql UPDATE user SET password=PASSWORD(new_password) WHERE user=root;
mysql FLUSH PRIVILEGES;

Method 3:
mysql SET PASSWORD FOR root=PASSWORD(new_password);

有人會(huì)問如果不知道 mysql root 的密碼情況下,是否可以修改密碼呢?答案:可以的,想知道方法請(qǐng)繼續(xù)往下看:

只有在 mysqld 啟動(dòng)的時(shí)候加上 –skip-grant-tables 就 ok,

例:

[root@server]# /usr/local/mysql/bin/mysqld_safe –skip-grant-tables

[root@server]# /usr/local/mysql/bin/mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 7
Server version: 5.0.45-log Source distribution

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(******)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.01 sec)

看完上述內(nèi)容,你們掌握 mysql 中怎么修改 root 密碼的方法了嗎?如果還想學(xué)到更多技能或想了解更多相關(guān)內(nèi)容,歡迎關(guān)注丸趣 TV 行業(yè)資訊頻道,感謝各位的閱讀!

正文完
 
丸趣
版權(quán)聲明:本站原創(chuàng)文章,由 丸趣 2023-08-03發(fā)表,共計(jì)1068字。
轉(zhuǎn)載說明:除特殊說明外本站除技術(shù)相關(guān)以外文章皆由網(wǎng)絡(luò)搜集發(fā)布,轉(zhuǎn)載請(qǐng)注明出處。
評(píng)論(沒有評(píng)論)
主站蜘蛛池模板: 东阳市| 呼伦贝尔市| 夏邑县| 吐鲁番市| 桐柏县| 黄山市| 贵南县| 礼泉县| 共和县| 旬阳县| 纳雍县| 岳阳县| 西林县| 友谊县| 乌鲁木齐市| 遵化市| 榆林市| 贵溪市| 囊谦县| 北宁市| 贡嘎县| 潍坊市| 班戈县| 卢龙县| 九江市| 云南省| 曲周县| 胶南市| 增城市| 苍溪县| 迭部县| 卓尼县| 库尔勒市| 罗城| 赤峰市| 吉木萨尔县| 扎囊县| 梅州市| 阳高县| 芒康县| 青田县|