200字范文,内容丰富有趣,生活中的好帮手!
200字范文 > Mysql忘记本地root的登录密码解决方法

Mysql忘记本地root的登录密码解决方法

时间:2019-01-11 23:14:17

相关推荐

Mysql忘记本地root的登录密码解决方法

数据库|mysql教程

Mysql,忘记,本地,root,登录,密码,解决,方法,解

数据库-mysql教程

龙珠源码,在ubuntu使用git,桌子上爬虫 白色,php飞飞,大连seo监控lzw

解决过程: 1、编辑/etc/f 在[mysqld] 配置部分添加一行 skip-grant-tables 2、保存后重启mysql [root@localhost etc]# service mysqld restart Shutting down MySQL. [ OK ] Starting MySQL. [ OK ] 3、登录数据库重新设置root密码 [root@localhost ~]

c 套打源码,vscode tab缩进,ubuntu 20.04.2,tomcat连接口,sqlite事务处理,播放器音效插件下载,新浪用的前端框架是什么,像鬼脸的爬虫是什么,mysql php 封装,韶关seo站内优化,自适应导航网站模板,ios打开网页 代码,网站模板文件不存在lzw

微信叫号php源码,vscode大括号插件,ubuntu分区 顺序,如何查看tomcat编码,南极爬虫,php静态函数调用,seo哪几个行业,飞飞影视网站源码破解,移动端html5网站模板lzw

解决过程:

1、编辑/etc/f

在[mysqld] 配置部分添加一行

skip-grant-tables

2、保存后重启mysql

[root@localhost etc]# service mysqld restart

Shutting down MySQL. [ OK ]

Starting MySQL. [ OK ]

3、登录数据库重新设置root密码

[root@localhost ~]# mysql -uroot -p mysql

Enter password:

直接回车进入

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 1

Server version: 5.1.47-log Source distribution

Copyright (c) 2000, , Oracle and/or its affiliates. All rights reserved.

This software comes with ABSOLUTELY NO WARRANTY. This is free software,

and you are welcome to modify and redistribute it under the GPL v2 license

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql> show databases;

+——————–+

| Database |

+——————–+

| information_schema |

| mysql |

| test|

+——————–+

3 rows in set (0.00 sec)

执行下列语句

mysql> use mysql

Reading table information for completion of table and column names

You can turn off this feature to get a quicker startup with -A

Database changed

mysql> update user set password=password(”mysql”) where user=’root’;

Query OK, 4 rows affected (0.00 sec)

Rows matched: 4 Changed: 4 Warnings: 0

mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)

/archives/7882.html

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。