MYSQL解決error: 'Access denied for user 'root'@'localhost' (using password:
MYSQL解決error: 'Access denied for user (using password:
YES)'問題
原因:平時沒有開起來mysql服務,開起來就報這個錯誤 MYSQL版本:5.6C:\Users\Administrator>mysql
ERROR 1045 (28000): Access denied for user
(using password:
N
O)
C:\Users\Administrator>cd C:\Program Files\MySQL\MySQL Server 5.5\bin
C:\Program Files\MySQL\MySQL Server 5.5\bin>net stop mysql
MySQL 服務正在停止.
MySQL 服務已成功停止。
C:\Program Files\MySQL\MySQL Server 5.5\bin>mysqld
--skip-grant-tables
你會看到視窗游標在下一行的第一個位置閃爍,這說明已經啟動了,不需要管。
新建一個命令列視窗同樣進入到e:\mysql5.5\bin目錄,啟動mysql
C:\Program Files\MySQL\MySQL Server 5.5\bin>mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.36 MySQL Community Server (GPL)
Copyright (c) 2000, 2014, 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> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
+--------------------+
4 rows in set (0.00 sec)
mysql> use mysql;
Database changed
mysql> update user set password=PASSWORD('oracle') where user='root';
Query OK, 2 rows affected (0.00 sec)
Rows matched: 2 Changed: 2 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
mysql> quit
Bye
看看那工作管理員中是否有mysqld.exe程式,如有,kill .
C:\Program Files\MySQL\MySQL Server 5.5\bin>net start mysql
MySQL 服務正在啟動 .
MySQL 服務已經啟動成功。
C:\Program Files\MySQL\MySQL Server 5.5\bin>mysql -uroot -poracle
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.36 MySQL Community Server (GPL)
Copyright (c) 2000, 2014, 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>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29065182/viewspace-1200171/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- mysql 1045, "Access denied for user 'root'@'localhost' (using password: NO)"MySqllocalhost
- 解決Mysql:ERROR 1045 (28000):Access denied for user ‘root‘@‘localhost‘ (using password: NO)的方法MySqlErrorlocalhost
- ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password:YES)Errorlocalhost
- 報錯”ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: NO)”Errorlocalhost
- MySQL 8.0.13 密碼問題 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)MySql密碼Errorlocalhost
- Linux錯誤 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)LinuxErrorlocalhost
- java.sql.SQLException: Access denied for user ‘root‘@‘localhost‘ (using password: YES)JavaSQLExceptionlocalhost
- 啟動報錯:Access denied for user 'root'@'localhost' (using password:YES)localhost
- vue專案中連線MySQL時,報錯ER_ACCESS_DENIED_ERROR: Access denied for user 'root'@'localhost' (using password:YES)VueMySqlErrorlocalhost
- mac os x 安裝mysql遇到 Access denied for user ‘root‘@‘localhost‘ (using password: YES)的解決方法MacMySqllocalhost
- MySQL系列:Docker安裝 MySQL提示錯誤:Access denied for user'root'@'localhost' (using password:yes)MySqlDockerlocalhost
- SpringBoot中yml配置java.sql.SQLException: Access denied for user ‘root‘@‘localhost‘ (using password: NOSpring BootJavaSQLExceptionlocalhost
- ubuntu mysql Access denied for user root@localhostUbuntuMySqllocalhost
- Ubuntu18.04:mysql:ERROR 1698 (28000): Access denied for user ‘root‘@‘localhost‘UbuntuMySqlErrorlocalhost
- Access denied for user ‘root‘@‘localhost‘問題的解決localhost
- SQLSTATE[HY000] [1045] Access denied for user ‘root‘@‘localhost‘ (using password: YES)”錯誤的隱藏解決辦法SQLlocalhost
- Navicat遠端連線MySQL 提示1045 - Access denied for user 'root'@'223.74.158.192'(using password:YES)MySql
- MySQL使用普通使用者訪問返回ERROR 1698 (28000): Access denied for user 'root'@'localhost'MySqlErrorlocalhost
- Caused by: java.sql.SQLException: Access denied for user 'dell-pc'@'xxxxx' (using password: YES)JavaSQLException
- 【本人親測 已解決】044 - Access denied for user ‘root‘@‘%‘ to database ‘資料庫名稱‘Database資料庫
- Access denied for user 'default'@'%' to database 'shop'報錯Database
- Permission denied:user=xxx,access=WRITE,inode=xxx
- MySQL:You must reset your password using ALTER USER statement before executing this statement.MySql
- laravel mysql批量提交報Access denied 錯誤LaravelMySql
- hive建立分割槽表報錯AccessControlException Permission denied: user=NONE, access=WRITE, inodeHiveExceptionNone
- After mysql installation, we need to change the password of root as belowMySql
- Windows git remote: HTTP Basic: Access denied 錯誤解決辦法WindowsGitREMHTTP
- 安裝kernel...src.rpm錯誤:warning: user mockbuild does not exist - using rootMockUI
- NFS掛載時出現”access denied by server while mounting”的解決方法NFSServerWhile
- mybatis進行資料庫建表 CREATE command denied to user 'root'@'127.0.0.1' for table 問題MyBatis資料庫127.0.0.1
- nginx中報Access denied.Nginx
- Navicat tnt版本提示“failed to save password error code”的解決辦法AIError
- 解決laravel出現Syntax error or access violation: 1055 ‘***‘ isn‘t in GROUP BYLaravelError
- SourceTreet提交時顯示remote: Incorrect username or password ( access token )(4種解決辦法)REM
- 解決SpringBoot頁面localhost 404問題,即Whitelabel Error Page問題Spring BootlocalhostError
- Docker + maven build problem — unix://localhost:80: Permission deniedDockerMavenUIlocalhost
- FreeBSD on Raspberry PI root, freebsd account password
- IOError: [Errno 13] Permission denied 解決:linux下python安裝並使用非root模組ErrorLinuxPython
- OGG Director連線報錯Access denied