解決Mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost'
Mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost'問題的解決
這種問題需要強行重新修改密碼,方法如下:
/etc/init.d/mysql stop (service mysqld stop )
/usr/bin/mysqld_safe --skip-grant-tables
另外開個SSH連線
[root@localhost ~]# mysql
mysql>use mysql
mysql>update user set password=password("123456") where user="root";
mysql>flush privileges;
mysql>exit
pkill -KILL -t pts/0 可將pts為0的**使用者(之前執行mysqld_safe的使用者視窗)強制踢出
正常啟動 MySQL:/etc/init.d/mysql start (service mysqld start)
注意:另外還遇到需要service mysql star才能啟動service mysql stop才能停止。
還有直接使用mysql不能找到命令,錯誤為“bash: mysql: command not found”可以直接**mysql的安裝目錄中的bin資料夾跟絕對路徑執行命令,還有的需要加./mysql 才能執行。
相關文章
- 解決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
- Ubuntu18.04:mysql:ERROR 1698 (28000): Access denied for user ‘root‘@‘localhost‘UbuntuMySqlErrorlocalhost
- mysql 1045, "Access denied for user 'root'@'localhost' (using password: NO)"MySqllocalhost
- MySQL使用普通使用者訪問返回ERROR 1698 (28000): Access denied for user 'root'@'localhost'MySqlErrorlocalhost
- ubuntu mysql Access denied for user root@localhostUbuntuMySqllocalhost
- Access denied for user ‘root‘@‘localhost‘問題的解決localhost
- 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
- mac os x 安裝mysql遇到 Access denied for user ‘root‘@‘localhost‘ (using password: YES)的解決方法MacMySqllocalhost
- Navicat遠端連線MySQL 提示1045 - Access denied for user 'root'@'223.74.158.192'(using password:YES)MySql
- java.sql.SQLException: Access denied for user ‘root‘@‘localhost‘ (using password: YES)JavaSQLExceptionlocalhost
- 啟動報錯:Access denied for user 'root'@'localhost' (using password:YES)localhost
- 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
- mysql登入報錯提示:ERROR 1045 (28000)的解決方法MySqlError
- ERROR 1045 (28000): ProxySQL Error: 報錯ErrorSQL
- 【本人親測 已解決】044 - Access denied for user ‘root‘@‘%‘ to database ‘資料庫名稱‘Database資料庫
- load data infile ERROR 1045 (28000)Error
- 使用Mysql登入時,ERREORE 1045(28000) 解決方法MySql
- Mysql資料庫報ERROR 1045 (28000)報錯及MySQL忘記密碼找回MySql資料庫Error密碼
- Access denied for user 'default'@'%' to database 'shop'報錯Database
- Permission denied:user=xxx,access=WRITE,inode=xxx
- mysql登入遇到ERROR 1045問題解決方法MySqlError
- laravel mysql批量提交報Access denied 錯誤LaravelMySql
- hive建立分割槽表報錯AccessControlException Permission denied: user=NONE, access=WRITE, inodeHiveExceptionNone
- Caused by: java.sql.SQLException: Access denied for user 'dell-pc'@'xxxxx' (using password: YES)JavaSQLException
- Windows git remote: HTTP Basic: Access denied 錯誤解決辦法WindowsGitREMHTTP
- mysqldump Got error: 1045MySqlGoError
- 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
- 解決laravel出現Syntax error or access violation: 1055 ‘***‘ isn‘t in GROUP BYLaravelError
- 解決SpringBoot頁面localhost 404問題,即Whitelabel Error Page問題Spring BootlocalhostError
- Docker + maven build problem — unix://localhost:80: Permission deniedDockerMavenUIlocalhost
- ORA-28000錯誤解決方案