MySQL找回管理员密码
更改MySQL提示符
mysql> prompt \u@mysql \r:\b:\s
查找以my开头的数据库
mysql> show databases like 'my%'
删除用户所有
mysql> delete from mysql.user;
添加用户权限
mysql> grant all privileges on *.* to system@'%' identified by '123qwe' with grant option;
立即生效
mysql> flush privileges;
查看当全用户权限和密码状况
mysql> select user,host,password from mysql.user;
为管理员设置密码
shell > mysqladmin -u system password '123qwe'
为管理员修改密码
1、shell > mysqladmin -u system -p123qwe password '123123'
2、mysql> update mysql.user set password=password("456") where user='system' and host='localhost';
mysql> flush privileges;
3、set password=password("123");
查看表结构
mysql> desc mysql.user;
找回丢失的mysql密码
shell
> /etc/init.d/mysqld stop
shell
> mysqld_safe
--skip-grant-tables –user=mysql & 单实例
shell
>mysqld_safe
--defaults-file=/data/3306/my.cnf --skip-grant-table & 多实例
mysql>
update mysql.user set password=password("456") where
user='system' and host='localhost';
mysql>
flush privileges;
shell
> mysqladmin -u -p shutdown
MySQL找回管理员密码的更多相关文章
- mysql修改管理员密码
mysql修改管理员密码杀掉mysql进程kill `cat /data/mysqldata/3306/mysql.pid`禁止连接禁止验证方式启动mysqlmysqld_safe --default ...
- mysql 修改管理员密码
mysql 修改管理员密码 本次学习环境: windows 7系统.mysql 5.7.14. 一.如果是忘记了用户密码: (1).关闭正在运行的MySQL服务. 方法一:可以直接操作wamp软件,左 ...
- Mysql找回管理员password
我们使用MYSQL的时候有可能由于种种原因忘记ROOTpassword,假设是那样数据库可能就废掉了.可是今天给大家分享下找回ROOTpassword的方法或者说是在不知道rootpassword的情 ...
- windows中的mysql修改管理员密码
上周安装了Mysl 但是却无法登陆,找了好久才找到这个解决办法,讲的详细谢谢了. [摘要:1.my-default.ini 更名my.ini 正在解压的目次上面复造my-default.ini一份更名 ...
- Mysql找回root密码
1.停止数据库服务 service mysql stop 2.修改my.cnf 添加skip-grant-tables 3.重启数据库 service mysql restart 4.修改root密码 ...
- Mysql 忘记管理员密码更改
对管理员设置密码 第一种方式: #mysqladmin -u root password 'new-password'; #mysqladmin -u root -h localhost passwo ...
- Mysql找回丢失密码
(先进入root权限):# /etc/init.d/mysql stop# mysqld_safe --user=mysql --skip-grant-tables --skip-networking ...
- gitlab找回管理员密码
1.登陆后台服务器,切换git用户 su - git 2.登录GitLab的Rails控制台 gitlab-rails console production 另一种 切换root账户 执行: git ...
- MySQL忘记root密码的找回方法
(1)登录到数据库所在服务器,手工kill掉MySQL进程: kill ' cat /mysql-data-directory/hostname.pid' 其中,/mysql-data-dir ...
随机推荐
- Learning to rank 介绍
PS:文章主要转载自CSDN大神hguisu的文章"机器学习排序": http://blog.csdn.net/hguisu/article/details/79 ...
- 第五次团队作业——【Alpha版本】随笔汇总
031402304 陈燊 031402342 许玲玲 031402337 胡心颖 03140241 王婷婷 031402203 陈齐民 031402209 黄伟炜 031402233 郑扬涛 [Alp ...
- linux shell if
if用法: if [ ] ;then command; elif [ ] ;then command; else command fi if 参数: shell 编程中使用到得if语句内判断参数 –b ...
- hdu5000 背包dp
题意可抽象为:N个包中每个包容量是T[i],每个包都拿一些,设拿出的总数为sum时的方案数为q,求max(q) 设dp[i][j]为拿了前i个包,共拿出了j物品时的方案数.那么 for i=1 to ...
- please wait while windows configures microsoft visual studio professional 2013 [转载]
2016年5月30日 VS3013安装update 2以后,打开offie出现"please wait while windows configures microsoft visual s ...
- Spring-IOC-BeanFactory
BeanFactory BeanFactory 是 Spring 的“心脏”.它就是 Spring IoC 容器的真面目.Spring 使用 BeanFactory 来实例化.配置和管理 Bean.但 ...
- Ubuntu学习总结-07 Nodejs和npm的安装
一 安装NodeJS 1 下载nodejs源码 从以下网址下载最新的Nodejs源码 https://nodejs.org/en/download/ 2 安装依赖的 python,gcc,g++ 函数 ...
- iOS plist文件创建
iOS中plist的创建,数据写入与读取功能创建一个test.plist文件,textInput作为输入,displayLabel作为显示,有一个按钮来触发保持程序triggerStorage: -( ...
- d3 document
https://github.com/d3/d3/wiki/API--%E4%B8%AD%E6%96%87%E6%89%8B%E5%86%8C https://github.com/d3/d3/wik ...
- .NET简谈事务、分布式事务处理
http://www.cnblogs.com/wangiqngpei557/archive/2011/12/22/2298500.html