MySQL跳過密碼登陸並修改用戶密碼

一、跳過密碼登陸: MySQL配置文件/etc/my.cnf中,在[mysqld]下添加skip-grant-tables,關閉 MySQL服務並從新開啓; 輸入命令:mysql -u root -p 回車後,要求輸入密碼,直接回車跳過,則直接進入MySQL。 二、網上搜到的命令爲以下 mysql> update user set password=password(「新密碼」) where us
相關文章
相關標籤/搜索