mysql 忘记的数据库密码
mysql 忘记的数据库密码
mysql -uroot -p
Enter password:
ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)
root 密码可以丢失或者忘记了。解决思路:目前是进入不了数据库的情况,所以我们要考虑是不是可以跳过权限。因为在数据库中,MySQL 数据库中 user 表记录着我们用户的信息。
解决方法:启动 MySQL 数据库的过程中,可以这样执行:
/usr/local/mysql/bin/mysqld_safe –defaults-file=/etc/my.cnf –skip-grant-tables &
这样启动,就可以不用输入密码,直接进入 MySQL 数据库了。然后在修改你自己想要改的 root 密码即可。
update mysql.user set password=password(‘04d20fb9c38c9′) where user=’root’
热门日志
分类
- git(9)
- Mac(7)
- C(1)
- memcache(1)
- Python(33)
- Vim(8)
- sed(2)
- ansible(3)
- awk(4)
- shell(3)
- Django(4)
- ssdb(1)
- bat(4)
- svn(0)
- docker(1)
- Tornado(1)
- go(2)
- 架构(20)
- Vue(1)
- game(2)
- AI(3)
- Windows(8)
- Java(8)
- Mysql(38)
- Ajax(2)
- Jsp(1)
- Struts(8)
- Linux(73)
- JavaScript(39)
- Staruml(0)
- Mouth(1)
- Html(6)
- Php(102)
- Message(55)
- Lua(10)
- Compute(1)
- Redis(6)
- Nginx(13)
- Jquery(1)
- Apache(1)
- cocos2d-x(8)
- about(1)
最新日志
随机日志
- linux 批量查找删除
- 独立IP与共享IP对SEO的影响分析(转载)
- php-fpm通过request_slowlog_timeout检查哪个脚本执行时间长
- 永远不要在 Linux 执行的 10 个最危险的命令
- js 实现php中sprintf函数
- Js中window.parent ,window.top,window.self 详解
- Warning: Unknown: Unable to allocate memory for pool. in Unknown on line 0 Warning: require_once(): Unable to allocate memory for pool
- Jquery跨域请求php获取数据之jsonp

