標籤:mysql
登入root使用者用root使用者登入控制台。
use mysqluse mysql,mysql是mysql資料庫自動建立的一個資料庫。
修改user表的資料
update user set password=PASSWORD('1234') where user='root';
重新整理許可權
FLUSH PRIVILEGES;
參考修改mysql使用者密碼
附:1、完整的命令列操作
mysql> show databases;+--------------------+| Database |+--------------------+| information_schema || mysql || ospm || performance_schema || test |+--------------------+5 rows in set (0.00 sec)mysql> use mysqlDatabase changedmysql> show tables;+---------------------------+| Tables_in_mysql |+---------------------------+| columns_priv || db || event || func || general_log || help_category || help_keyword || help_relation || help_topic || host || ndb_binlog_index || plugin || proc || procs_priv || proxies_priv || servers || slow_log || tables_priv || time_zone || time_zone_leap_second || time_zone_name || time_zone_transition || time_zone_transition_type || user |+---------------------------+24 rows in set (0.00 sec)mysql> update user set password=PASSWORD('1234') where user='root';Query OK, 1 row affected (0.02 sec)Rows matched: 1 Changed: 1 Warnings: 0mysql> FLUSH PRIVILEGES;Query OK, 0 rows affected (0.00 sec)mysql>
著作權聲明:本文為博主原創文章,未經博主允許不得轉載。
mysql修改使用者密碼