Linux下mysql 忘记密码的解决办法
>mysql -u root -p Enter password: ******** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 12 Server version: 5.7.18-log MySQL Community Server (GPL) Copyright (c) 2000, 2017, 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> use mysql; Database changed mysql> select User from user; #此处为查询用户命令 +-----------+ | User | +-----------+ | ******* | | mysql.sys | | root | +-----------+ 3 rows in set (0.00 sec) mysql> update user set password=password("*******") where user="*******"; #修改密码报错 (版本不同 我用这个成功了) ERROR 1054 (42S22): Unknown column 'password' in 'field list' mysql> update mysql.user set authentication_string=password('*******') where user='*******'; #修改密码成功 Query OK, 1 row affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 1 mysql> flush privileges; #立即生效 Query OK, 0 rows affected (0.00 sec) mysql> quit Bye n>mysql -u ******* -p #以该用户登录成功. Enter password: ******** ………………………… mysql>
Linux下mysql 忘记密码的解决办法的更多相关文章
- Windows下mysql忘记密码的解决方法
Windows下mysql忘记密码的解决方法 mysql5.0 http://www.jb51.net/article/21984.htm方法一: 1.在DOS窗口下输入 net stop mysql ...
- Linux下MySQL忘记密码
系统:CentOS6.6 64位 参考文档(截图请看原网址): Linux下MySQL忘记root密码怎么办_百度经验 http://jingyan.baidu.com/article/1709ad8 ...
- mysql忘记密码的解决办法
mysql忘记密码时,需要重设密码. 在Windows下的操作如下: 1.关闭正在运行的MySQL. 2.打开DOS窗口,转到mysql\bin目录. 3.输入mysqld --skip-grant- ...
- linux下mysql忘记密码解决方案
一.写随笔的原因:之前自己服务器上的mysql很久不用了,忘记了密码,所以写一下解决方案,以供以后参考 二.具体的内容: 1. 检查mysql服务是否启动,如果启动,关闭mysql服务 运行命令:ps ...
- linux下mysql忘记密码的解决方案
1.首先确认服务器出于安全的状态,也就是没有人能够任意地连接MySQL数据库. 因为在重新设置MySQL的root密码的期间,MySQL数据库完全出于没有密码保护的 状态下,其他的用户也可以任意地 ...
- linux下mysql忘记密码怎么办
前言 今天在服务器安装mysql之后,登录发现密码错误,但是我没有设置密码呀,最后百度之后得知,mysql在5.7版本之后会自动创建一个初始密码. 报错如下: [root@mytestlnx02 ~] ...
- Linux 下 Mysql忘记密码重置
1.修改配置文件 /etc/my.cnf 在[mysqld]下 加入skip-grant-tables 2.重启mysql 命令:service mysqld restart 3.等待几分钟后 就可以 ...
- linux 下mysql忘记密码或者安装好linux后不知道mysql初始密码解决方案
1.使用yum安装mysql后 2.初始密码在/var/log/mysqld.log这个文件里 3.输入命令:grep 'temporary password' /var/log/mysqld.log ...
- linux下mysql忘记root密码怎么办
Linux下MySQL忘记root密码怎么办? Linux下MySQL忘记root密码怎么办? 1. 修改MySQL配置文件 默认MySQL的配置文件为/etc/my.cnf,在[mysqld]下面添 ...
随机推荐
- 【codeforces 798C】Mike and gcd problem
[题目链接]:http://codeforces.com/contest/798/problem/C [题意] 给你n个数字; 要求你进行若干次操作; 每次操作对第i和第i+1个位置的数字进行; 将 ...
- 【[Offer收割]编程练习赛11 B】物品价值
[题目链接]:http://hihocoder.com/problemset/problem/1486 [题意] [题解] 设f[i][j]表示前i个物品,每种属性的状态奇偶状态为j的最大价值; 这里 ...
- [SCSS] Convert SCSS Variable Arguments to JavaScript
We will learn how to convert variable arguments by using rest operator in JavaScript. .sass-btn { co ...
- emacs 搭建racket开发环境
emacs 搭建racket开发环境 emacs下搭建开发racket的环境,笔者之前用过下面两种模式:geiser和racket-mode.相对而言,后一种方式要显得简单.本文主要介绍后一种方式环境 ...
- leetcode第一刷_Minimum Depth of Binary Tree
非常easy的题目.只是还是认为要说一下. 最小深度.非常快想到bfs,层序遍历嘛.本科的时候实在是没写过多少代码,一開始竟然想不到怎么保存一层的信息.后来想到能够压入一个特殊的对象,每次到达这个对象 ...
- sikuli_ide打开提示没有对应的javaw
对于sikuli,需要安装32位的jdk且不能高于1.7的版本 对于64位系统的C盘,Program Files文件夹是64位的,Program File(x86)文件夹是32位的 需要安装一个32位 ...
- pod install fatal: unable to access 'https://chromium.googlesource.com/webm/libwebp/'
1. 前往文件夹 /用户/aki/.cocoapods/repos/master/1/9/2/libwebp 2.编辑libwebp.podspec.json 将source git 改为 https ...
- luogu2303 [SDOI2012] Longge的问题
题目大意:给出n,求sum foreach i(1<=i<=n) (gcd(n, i)). 1~n有太多的数,但是n与m的最大公约数却有很多重复.所以我们枚举最大公约数k,然后让k乘以与n ...
- 【Codeforces 258D】 Count Good Substrings
[题目链接] http://codeforces.com/contest/451/problem/D [算法] 合并后的字符串一定是形如"ababa","babab&qu ...
- 2014/09/20 关于ArrayList的几种操作
1.删除ArrayList集合元素 删除ArrayList集合里面的元素时,提供了Clear方法,Remove方法,RmoveAt方法和RemoveRange方法. Clear方法是移除所有的元素 R ...