广告
返回顶部
首页 > 资讯 > 数据库 >分析mysqld的skip-grant-tables选项
  • 828
分享到

分析mysqld的skip-grant-tables选项

2024-04-02 19:04:59 828人浏览 独家记忆
摘要

这篇文章主要讲解了“分析Mysqld的skip-grant-tables选项”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“分析mysqld的skip-gra

这篇文章主要讲解了“分析Mysqld的skip-grant-tables选项”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“分析mysqld的skip-grant-tables选项”吧!

这个选项会导致不使用权限系统来启动服务器,它将让任何用户可以访问服务器并且不受限制的访问所有数据库。在不使用授权表启动服务器后可以通过shell来执行mysqladmin flush-privileges或mysqladmin reload命令或者在连接到服务器后执行flush privileges语句来让正在运行的服务器再次使用授权表。

使用--skip-grant-tables选项启动服务器

[root@localhost mysql]# service mysqld stop
Shutting down MySQL. SUCCESS! 
[root@localhost mysql]# service mysqld start --skip-grant-tables
Starting MySQL.. SUCCESS!

现在就可以不使用用户和密码就可以登录服务器

[mysql@localhost ~]$ mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.26-log Source distribution
Copyright (c) 2000, 2019, 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>

现在可以执行mysqladin flush-privileges命令让正在运行的服务器再次使用授权表

[mysql@localhost ~]$ mysqladmin  flush-privileges

现在不使用用户和密码就不能登录服务器了,必须使用用户和密码才能登录了

[mysql@localhost ~]$ mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using passWord: NO)
[mysql@localhost ~]$ mysql -uroot -pabcd mysql
mysql: [Warning] Using a password on the command line interface can be insecure.
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 5
Server version: 5.7.26-log Source distribution
Copyright (c) 2000, 2019, 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.

再次使用--skip-grant-tables选项启动服务器

[root@localhost mysql]# service mysqld stop
Shutting down MySQL.. SUCCESS! 
[root@localhost mysql]# service mysqld start --skip-grant-tables
Starting MySQL.. SUCCESS!

现在就可以不使用用户和密码就可以登录服务器

[mysql@localhost ~]$ mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.26-log Source distribution
Copyright (c) 2000, 2019, 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>

现在可以执行mysqladin reload命令让正在运行的服务器再次使用授权表

mysql@localhost ~]$ mysqladmin reload

现在不使用用户和密码就不能登录服务器了,必须使用用户和密码才能登录了

[mysql@localhost ~]$ mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[mysql@localhost ~]$ mysql -uroot -pabcd mysql
mysql: [Warning] Using a password on the command line interface can be insecure.
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 5
Server version: 5.7.26-log Source distribution
Copyright (c) 2000, 2019, 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.

再次使用--skip-grant-tables选项启动服务器

[root@localhost mysql]# service mysqld stop
Shutting down MySQL. SUCCESS! 
[root@localhost mysql]# service mysqld start --skip-grant-tables
Starting MySQL.. SUCCESS!

现在就可以不使用用户和密码就可以登录服务器

[mysql@localhost ~]$ mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.26-log Source distribution
Copyright (c) 2000, 2019, 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>

现在可以执行flush privileges语句让正在运行的服务器再次使用授权表

mysql> flush privileges;
Query OK, 0 rows affected (0.12 sec)

现在不使用用户和密码就不能登录服务器了,必须使用用户和密码才能登录了

[mysql@localhost ~]$ mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[mysql@localhost ~]$ mysql -uroot -pabcd mysql
mysql: [Warning] Using a password on the command line interface can be insecure.
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 5
Server version: 5.7.26-log Source distribution
Copyright (c) 2000, 2019, 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.

--skip-grant-tables选项也可以在选项文件my.cnf中进行设置。这个选项还会导致服务器在启动过程中禁止加载用户定义函数(udf),调度事件和安装插件语句中安装的插件。为了以任何方式来加载插件,使用--plugin-load选项。--skip-grant-tables选项也会导致disabled_storage_engines系统变量失效。

flush privileges语句可以在服务器启动后通过执行其它操作来隐式执行。例如在升级过程中mysql_upgrade程序就会刷新权限。

感谢各位的阅读,以上就是“分析mysqld的skip-grant-tables选项”的内容了,经过本文的学习后,相信大家对分析mysqld的skip-grant-tables选项这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是编程网,小编将为大家推送更多相关知识点的文章,欢迎关注!

您可能感兴趣的文档:

--结束END--

本文标题: 分析mysqld的skip-grant-tables选项

本文链接: https://www.lsjlt.com/news/63085.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • 分析mysqld的skip-grant-tables选项
    这篇文章主要讲解了“分析mysqld的skip-grant-tables选项”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“分析mysqld的skip-gra...
    99+
    2022-10-18
  • 如何解决MySQL报错:MySQL服务器正在使用--skip-grant-tables选项运行
    在MySQL服务器运行时使用了--skip-grant-tables选项,意味着跳过了用户验证的步骤,任何人都可以访问数据库。这种情...
    99+
    2023-10-12
    MySQL
  • 影响mysqld安全的几个选项分别是什么
    影响mysqld安全的几个选项分别是什么,相信很多没有经验的人对此束手无策,为此本文总结了问题出现的原因和解决方法,通过这篇文章希望你能解决这个问题。 影响mysqld安全的几...
    99+
    2022-10-19
  • wget各种选项分类的示例分析
    小编给大家分享一下wget各种选项分类的示例分析,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!wget各种选项分类列表 "  &nb...
    99+
    2023-06-09
  • GI安装选项的示例分析
    这篇文章给大家分享的是有关GI安装选项的示例分析的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。 GI:Grid InfrastructureInsta...
    99+
    2022-10-18
  • Bootstrap中tab选项的示例分析
    这篇文章主要介绍了Bootstrap中tab选项的示例分析,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。选项卡Tabs是Web中一种非常常用的功能。用户点击对菜单项,能切换出...
    99+
    2023-06-14
  • python选项参数的示例分析
    这篇文章将为大家详细讲解有关python选项参数的示例分析,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。#!c:python26python.exeimport optparsedef main(): &...
    99+
    2023-06-03
  • 分析PostgreSQL DBA中新增的WAL选项
    这篇文章主要讲解了“分析PostgreSQL DBA中新增的WAL选项”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“分析PostgreSQL DBA中新增的...
    99+
    2022-10-18
  • Vue选项式API的生命周期选项和组合式API源码分析
    本文小编为大家详细介绍“Vue选项式API的生命周期选项和组合式API源码分析”,内容详细,步骤清晰,细节处理妥当,希望这篇“Vue选项式API的生命周期选项和组合式API源码分析”文章能帮助大家解决疑惑,下面跟着小编的思路慢慢深入,一起来...
    99+
    2023-07-05
  • Vue3中触发组件选项的示例分析
    小编给大家分享一下Vue3中触发组件选项的示例分析,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!事件名与组件和prop一样,事件...
    99+
    2022-10-19
  • js选项卡切换效果的示例分析
    这篇文章主要介绍js选项卡切换效果的示例分析,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!具体内容如下通过设置定时器实现延时0.5s切换,一个重要的技巧是定义了一个that变量来存放...
    99+
    2022-10-19
  • Visual Studio .NET选项和配置的示例分析
    小编给大家分享一下Visual Studio .NET选项和配置的示例分析,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!Visual Studio .NET 是用...
    99+
    2023-06-17
  • html5 datalist选中option选项后触发事件的示例分析
    这篇文章将为大家详细讲解有关html5 datalist选中option选项后触发事件的示例分析,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。使用input + datalist 实现自动补全功能,其中d...
    99+
    2023-06-09
  • SAP MM MB5L事务代码中仅总计选项的示例分析
    本篇文章为大家展示了SAP MM MB5L事务代码中仅总计选项的示例分析,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。SAP MM MB5L事务代码'仅总计'选项初探MB5L,如下查...
    99+
    2023-06-05
  • layui中数据表格+分页+搜索+checkbox+缓存选中项数据的示例分析
    这篇文章主要介绍了layui中数据表格+分页+搜索+checkbox+缓存选中项数据的示例分析,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。...
    99+
    2022-10-19
  • Oracle中EBS工具选项之关闭其他表单修改的示例分析
    这篇文章主要介绍了Oracle中EBS工具选项之关闭其他表单修改的示例分析,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。Oracle EBS...
    99+
    2022-10-18
  • js鼠标经过tab选项卡时实现切换延迟的示例分析
    这篇文章将为大家详细讲解有关js鼠标经过tab选项卡时实现切换延迟的示例分析,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。    ...
    99+
    2022-10-19
  • Fedora35取消“允许用密码登录SSH Root”安装程序选项的示例分析
    这期内容当中小编将会给大家带来有关Fedora35取消“允许用密码登录SSH Root”安装程序选项的示例分析,文章内容丰富且以专业的角度为大家分析和叙述,阅读完这篇文章希望大...
    99+
    2022-10-19
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作