当前位置: 首页 > news >正文

几分钟做网站黄页网络的推广网站有哪些

几分钟做网站,黄页网络的推广网站有哪些,品牌建设思维导图,做僾网站MySQL数据库中如何修改root用户的密码呢?下面总结了修改root用户密码的一些方法1: 使用set password语句修改mysql> select user();----------------| user() |----------------| rootlocalhost |----------------1 row in set (0.08 sec)mysql> s…

MySQL数据库中如何修改root用户的密码呢?下面总结了修改root用户密码的一些方法

1: 使用set password语句修改

mysql> select user();

+----------------+

| user() |

+----------------+

| root@localhost |

+----------------+

1 row in set (0.08 sec)

mysql> set password=password('123456');

Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)

mysql> exit

201507211028147.png

2: 更新mysql数据库的user表

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('QwE123') where user='root';

Query OK, 4 rows affected (0.03 sec)

Rows matched: 4 Changed: 4 Warnings: 0

mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)

mysql> quit

201507211028148.png

3:使用mysqladmin命令修改

命令一般为 mysqladmin -u root -p'oldpassword' password newpass 如下所示:

[root@DB-Server ~]# mysqladmin -u root -p'123456' password 'Qwe123'

Warning: Using a password on the command line interface can be insecure.

验证root密码修改是否成功

[root@DB-Server ~]# mysqladmin -u root -p'123456' password 'Qwe123'

Warning: Using a password on the command line interface can be insecure.

上面都是在知道root密码的情况下修改root密码,如果忘记了root密码,如何修改root的密码呢?

1:首先停掉MySQL服务

[root@DB-Server ~]# service mysql stop

Shutting down MySQL..[ OK ]

[root@DB-Server ~]#

[root@DB-Server ~]# /etc/rc.d/init.d/mysql stop

Shutting down MySQL..[ OK ]

2:然后使用mysqld_safe命令启动mysql,更新root账号的密码

--skip-grant-tables:不启动grant-tables(授权表),跳过权限控制。

--skip-networking :跳过TCP/IP协议,只在本机访问(这个选项不是必须的。可以不用)是可以不用

[root@DB-Server ~]# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &

[1] 5145

You have new mail in /var/spool/mail/root

[root@DB-Server ~]# 150709 14:10:53 mysqld_safe Logging to '/var/lib/mysql/DB-Server.localdomain.err'.

150709 14:10:53 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

[root@DB-Server ~]# mysql -u root mysql

Reading table information for completion of table and column names

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

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

Your MySQL connection id is 1

Server version: 5.6.20-enterprise-commercial-advanced MySQL Enterprise Server - Advanced Edition (Commercial)

Copyright (c) 2000, 2014, 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> show databases;

+--------------------+

| Database |

+--------------------+

| information_schema |

| mysql |

| performance_schema |

| test |

+--------------------+

4 rows in set (0.00 sec)

mysql> use mysql

Database changed

mysql> UPDATE user SET password=PASSWORD("Qwe123") WHERE user='root';

Query OK, 4 rows affected (0.01 sec)

Rows matched: 4 Changed: 4 Warnings: 0

mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)

mysql> exit

Bye

3:重新启动MySQL服务。

以上所述就是本文的全部内容了,希望大家能够喜欢

本文标题: MySQL修改root账号密码的方法

本文地址: http://www.cppcns.com/shujuku/mysql/128401.html

http://www.lbrq.cn/news/2529289.html

相关文章:

  • 网站网页设计怎样网站外部优化的4大重点
  • 农村电商网站建设方案台州seo排名优化
  • 网站建设要做哪些工作室线上推广公司
  • 东莞网站设计建设北京专业网站优化
  • 做兼职网站的项目初衷信息流优化师证书
  • 上海闸北区网站建设搜索到的相关信息
  • 三种人不适合编程seo外包收费
  • 网站设计点评企业网站seo案例分析
  • 有了域名自己电脑怎么做网站昆明seo案例
  • 建设网站技术公司seo网络推广知识
  • 网站模版 模板自己怎么创建网站
  • 综合性门户网站有哪些苏州百度推广公司地址
  • 滨州网站建设招聘营销比较好的知名公司有哪些
  • 如何自己做优惠券网站深圳市企业网站seo
  • 英文网站建设方案今天最新新闻
  • 平台开发工程师上海seo网站优化
  • 上海网站建设 网站开发肇庆seo优化
  • 广西智能网站建设哪家好合肥seo公司
  • 建立网站原理seo关键词优化软件app
  • 免费空间贴吧网络优化公司
  • 个人备案的网站可以做什么seo优化咨询
  • 珠海高端网站建设公司知识付费网站搭建
  • 画册设计效果图汕头seo关键词排名
  • 郴州网站建设哪个好重庆森林为什么不能看
  • 龙华建设局网站uc浏览器网页版入口
  • 西安网页设计师seo网站推广专员招聘
  • 美图秀秀在线修图seo职位要求
  • 那个网站推作者百度首页优化排名
  • 网站建设 资质使用最佳搜索引擎优化工具
  • 描述一下网站建设的基本流程直通车怎么开才有效果
  • elk部署加日志收集
  • Mac配置iterm2
  • 通达OA服务器无公网IP网络,如何通过内网穿透实现外网远程办公访问OA系统
  • 少林寺用什么数据库?
  • 智能车辆热管理测试方案——提升效能与保障安全
  • Vulkan入门教程 | 第二部分:创建实例