首頁 資料庫 mysql教程 mysql命令模式修改mysql root密码笔记

mysql命令模式修改mysql root密码笔记

Jun 07, 2016 pm 04:22 PM
mysql root 修改 命令 密碼 模式 筆記

修改mysql密码过程如下 百度搜索一文章看到使用 格式:mysqladmin -u用户名 -p旧密码 password 新密码 修改于时我下看操作 Enter password: Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 10 Server version: 5.5.2

   修改mysql密码过程如下

  百度搜索一文章看到使用

  格式:mysqladmin -u用户名 -p旧密码 password 新密码

  修改于时我下看操作

  Enter password:

  Welcome to the MySQL monitor. Commands end with ; or g.

  Your MySQL connection id is 10

  Server version: 5.5.27-log MySQL Community Server (GPL)

  Copyright (c) 2000, 2011, 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> mysqladmin -u root password 我要设置的密码

  ->

  -> ;

  ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that

  corresponds to your MySQL server version for the right syntax to use near 'mysql

  admin -u root password 我要设置的密码' at line 1

  mysql> mysqladmin -u root -password 我要设置的密码

  -> ;

  ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that

  corresponds to your MySQL server version for the right syntax to use near 'mysql

  admin -u root -password 我要设置的密码' at line 1

  最后小编使用了 mysqladmin -u root -password 我要设置的密码 无法搞定,突然想到直接更新表即可。

  mysql> update mysql.user set password=PASSWORD('我要设置的密码') where User ='root

  ';

  Query OK, 3 rows affected (0.05 sec)

  Rows matched: 3 Changed: 3 Warnings: 0

  mysql> flush privileges;

  Query OK, 0 rows affected (0.01 sec)

  mysql>

  好了这样就搞定了哦,虽然过程不复杂也不简单。

本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn

熱AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Clothoff.io

Clothoff.io

AI脫衣器

AI Hentai Generator

AI Hentai Generator

免費產生 AI 無盡。

熱門文章

R.E.P.O.能量晶體解釋及其做什麼(黃色晶體)
2 週前 By 尊渡假赌尊渡假赌尊渡假赌
倉庫:如何復興隊友
4 週前 By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island冒險:如何獲得巨型種子
3 週前 By 尊渡假赌尊渡假赌尊渡假赌

熱工具

記事本++7.3.1

記事本++7.3.1

好用且免費的程式碼編輯器

SublimeText3漢化版

SublimeText3漢化版

中文版,非常好用

禪工作室 13.0.1

禪工作室 13.0.1

強大的PHP整合開發環境

Dreamweaver CS6

Dreamweaver CS6

視覺化網頁開發工具

SublimeText3 Mac版

SublimeText3 Mac版

神級程式碼編輯軟體(SublimeText3)

PHP 的大數據結構處理技巧 PHP 的大數據結構處理技巧 May 08, 2024 am 10:24 AM

PHP 的大數據結構處理技巧

如何優化 PHP 中的 MySQL 查詢效能? 如何優化 PHP 中的 MySQL 查詢效能? Jun 03, 2024 pm 08:11 PM

如何優化 PHP 中的 MySQL 查詢效能?

如何在 PHP 中使用 MySQL 備份和還原? 如何在 PHP 中使用 MySQL 備份和還原? Jun 03, 2024 pm 12:19 PM

如何在 PHP 中使用 MySQL 備份和還原?

輕鬆取得已連接手機WiFi密碼的方法(快速尋找手機中已儲存的WiFi密碼) 輕鬆取得已連接手機WiFi密碼的方法(快速尋找手機中已儲存的WiFi密碼) May 08, 2024 pm 01:10 PM

輕鬆取得已連接手機WiFi密碼的方法(快速尋找手機中已儲存的WiFi密碼)

Win10密碼不符合密碼原則要求咋辦? 電腦密碼不符合政策要求解決方法 Win10密碼不符合密碼原則要求咋辦? 電腦密碼不符合政策要求解決方法 Jun 25, 2024 pm 04:59 PM

Win10密碼不符合密碼原則要求咋辦? 電腦密碼不符合政策要求解決方法

如何使用 PHP 插入資料到 MySQL 表? 如何使用 PHP 插入資料到 MySQL 表? Jun 02, 2024 pm 02:26 PM

如何使用 PHP 插入資料到 MySQL 表?

如何修復 MySQL 8.4 上的 mysql_native_password 未載入錯誤 如何修復 MySQL 8.4 上的 mysql_native_password 未載入錯誤 Dec 09, 2024 am 11:42 AM

如何修復 MySQL 8.4 上的 mysql_native_password 未載入錯誤

如何在 PHP 中使用 MySQL 預存程序? 如何在 PHP 中使用 MySQL 預存程序? Jun 02, 2024 pm 02:13 PM

如何在 PHP 中使用 MySQL 預存程序?

See all articles