ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password:YES)
無my.ini修改密碼方法
ERROR 1045 (28000): Ac…… password: YES)這個意思是密碼不正確,那就修改密碼:
如果是windows,mysql 5.1後的版本中沒有mysqld-nt.exe,則直接利用mysqld.exe代替即可。
1,停止MYSQL服務,CMD開啟DOS視窗(win7、winVista右鍵“用管理員賬戶執行”),輸入 net stop mysql
2,在CMD命令列視窗,進入MYSQL安裝目錄 比如C:\Program Files\MySQL\MySQL Server 5.1\bin
方法:cd\ 按enter後輸入:cd C:\Program Files\MySQL\MySQL Server 5.1\bin
3,進入mysql安全模式,即當mysql起來後,不用輸入密碼就能進入資料庫。
命令為: mysqld-nt --skip-grant-tables
(win7好像有錯,我沒管直接跳過,)
4,重新開啟一個CMD命令列視窗,進入...\bin下,,輸入mysql -uroot -p,使用空密碼的方式登入MySQL(不用輸入密碼,直接按回車)
5,輸入以下命令開始修改root使用者的密碼(注意:命令中mysql.user中間有個“點”)
mysql> update mysql.user set authentication_string=password('root') where user='root' ;
mysql> update mysql.user set authentication_string=password('123') where user='root';
Query OK, 0 rows affected, 1 warning (0.02 sec)
Rows matched: 1 Changed: 0 Warnings: 1
6,重新整理許可權表
mysql> flush privileges;
7,退出
mysql> quit
這樣MYSQL超級管理員賬號 ROOT已經重新設定好了,接下來 在工作管理員裡結束掉 mysql-nt.exe 這個程式,重新啟動MYSQL即可!
MYSQL重新啟動後,就可以用新設定的ROOT密碼登陸MYSQL了!
相關文章
- Linux錯誤 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)LinuxErrorlocalhost
- 報錯”ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: NO)”Errorlocalhost
- 解決Mysql:ERROR 1045 (28000):Access denied for user ‘root‘@‘localhost‘ (using password: NO)的方法MySqlErrorlocalhost
- MySQL 8.0.13 密碼問題 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)MySql密碼Errorlocalhost
- mysql 1045, "Access denied for user 'root'@'localhost' (using password: NO)"MySqllocalhost
- 啟動報錯:Access denied for user 'root'@'localhost' (using password:YES)localhost
- java.sql.SQLException: Access denied for user ‘root‘@‘localhost‘ (using password: YES)JavaSQLExceptionlocalhost
- Navicat遠端連線MySQL 提示1045 - Access denied for user 'root'@'223.74.158.192'(using password:YES)MySql
- vue專案中連線MySQL時,報錯ER_ACCESS_DENIED_ERROR: Access denied for user 'root'@'localhost' (using password:YES)VueMySqlErrorlocalhost
- SQLSTATE[HY000] [1045] Access denied for user ‘root‘@‘localhost‘ (using password: YES)”錯誤的隱藏解決辦法SQLlocalhost
- MySQL系列:Docker安裝 MySQL提示錯誤:Access denied for user'root'@'localhost' (using password:yes)MySqlDockerlocalhost
- Ubuntu18.04:mysql:ERROR 1698 (28000): Access denied for user ‘root‘@‘localhost‘UbuntuMySqlErrorlocalhost
- mac os x 安裝mysql遇到 Access denied for user ‘root‘@‘localhost‘ (using password: YES)的解決方法MacMySqllocalhost
- SpringBoot中yml配置java.sql.SQLException: Access denied for user ‘root‘@‘localhost‘ (using password: NOSpring BootJavaSQLExceptionlocalhost
- MySQL使用普通使用者訪問返回ERROR 1698 (28000): Access denied for user 'root'@'localhost'MySqlErrorlocalhost
- ubuntu mysql Access denied for user root@localhostUbuntuMySqllocalhost
- Caused by: java.sql.SQLException: Access denied for user 'dell-pc'@'xxxxx' (using password: YES)JavaSQLException
- Access denied for user ‘root‘@‘localhost‘問題的解決localhost
- ERROR 1045 (28000): ProxySQL Error: 報錯ErrorSQL
- load data infile ERROR 1045 (28000)Error
- Permission denied:user=xxx,access=WRITE,inode=xxx
- Access denied for user 'default'@'%' to database 'shop'報錯Database
- 【本人親測 已解決】044 - Access denied for user ‘root‘@‘%‘ to database ‘資料庫名稱‘Database資料庫
- mysql登入報錯提示:ERROR 1045 (28000)的解決方法MySqlError
- MySQL:You must reset your password using ALTER USER statement before executing this statement.MySql
- Mysql資料庫報ERROR 1045 (28000)報錯及MySQL忘記密碼找回MySql資料庫Error密碼
- hive建立分割槽表報錯AccessControlException Permission denied: user=NONE, access=WRITE, inodeHiveExceptionNone
- mysqldump Got error: 1045MySqlGoError
- 安裝kernel...src.rpm錯誤:warning: user mockbuild does not exist - using rootMockUI
- 使用Mysql登入時,ERREORE 1045(28000) 解決方法MySql
- mybatis進行資料庫建表 CREATE command denied to user 'root'@'127.0.0.1' for table 問題MyBatis資料庫127.0.0.1
- nginx中報Access denied.Nginx
- Docker + maven build problem — unix://localhost:80: Permission deniedDockerMavenUIlocalhost
- FreeBSD on Raspberry PI root, freebsd account password
- OGG Director連線報錯Access denied
- laravel mysql批量提交報Access denied 錯誤LaravelMySql
- Error: Permission denied @ apply2filesErrorAPP
- After mysql installation, we need to change the password of root as belowMySql