In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "analyzing the skip-grant-tables options of mysqld". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "analyze the skip-grant-tables options of mysqld".
This option will cause the server to be started without using the privilege system, which will allow any user to access the server and unrestricted access to all databases. After starting the server without using the authorization table, you can execute the mysqladmin flush-privileges or mysqladmin reload command through shell or execute the flush privileges statement after connecting to the server to get the running server to use the authorization table again.
Start the server using the-- skip-grant-tables option
[root@localhost mysql] # service mysqld stopShutting down MySQL. SUCCESS! [root@localhost mysql] # service mysqld start-- skip-grant-tablesStarting MySQL.. SUCCESS!
You can now log in to the server without using a user and password
[mysql@localhost] $mysqlWelcome to the MySQL monitor. Commands end with; or\ g.Your MySQL connection id is 2Server version: 5.7.26-log Source distributionCopyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.mysql >
You can now execute the mysqladin flush-privileges command to make the running server use the authorization table again
[mysql@localhost ~] $mysqladmin flush-privileges
Now you can't log in to the server without using a user and password. You must use a user and password to log in.
[mysql@localhost ~] $mysqlERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) [mysql@localhost ~] $mysql-uroot-pabcd mysqlmysql: [Warning] Using a password on the command line interface can be insecure.Reading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with-AWelcome to the MySQL monitor. Commands end with; or\ g.Your MySQL connection id is 5Server version: 5.7.26-log Source distributionCopyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.
Start the server again using the-- skip-grant-tables option
[root@localhost mysql] # service mysqld stopShutting down MySQL.. SUCCESS! [root@localhost mysql] # service mysqld start-- skip-grant-tablesStarting MySQL.. SUCCESS!
You can now log in to the server without using a user and password
[mysql@localhost] $mysqlWelcome to the MySQL monitor. Commands end with; or\ g.Your MySQL connection id is 2Server version: 5.7.26-log Source distributionCopyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.mysql >
You can now execute the mysqladin reload command to make the running server use the authorization table again
Mysql@localhost ~] $mysqladmin reload
Now you can't log in to the server without using a user and password. You must use a user and password to log in.
[mysql@localhost ~] $mysqlERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) [mysql@localhost ~] $mysql-uroot-pabcd mysqlmysql: [Warning] Using a password on the command line interface can be insecure.Reading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with-AWelcome to the MySQL monitor. Commands end with; or\ g.Your MySQL connection id is 5Server version: 5.7.26-log Source distributionCopyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.
Start the server again using the-- skip-grant-tables option
[root@localhost mysql] # service mysqld stopShutting down MySQL. SUCCESS! [root@localhost mysql] # service mysqld start-- skip-grant-tablesStarting MySQL.. SUCCESS!
You can now log in to the server without using a user and password
[mysql@localhost] $mysqlWelcome to the MySQL monitor. Commands end with; or\ g.Your MySQL connection id is 2Server version: 5.7.26-log Source distributionCopyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.mysql >
You can now execute the flush privileges statement to make the running server use the authorization table again
Mysql > flush privileges;Query OK, 0 rows affected (0.12 sec)
Now you can't log in to the server without using a user and password. You must use a user and password to log in.
[mysql@localhost ~] $mysqlERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) [mysql@localhost ~] $mysql-uroot-pabcd mysqlmysql: [Warning] Using a password on the command line interface can be insecure.Reading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with-AWelcome to the MySQL monitor. Commands end with; or\ g.Your MySQL connection id is 5Server version: 5.7.26-log Source distributionCopyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.
-- the skip-grant-tables option can also be set in the options file my.cnf. This option also causes the server to disable loading user-defined functions (udf), scheduling events, and installing plug-ins installed in plug-in statements during startup. To load the plug-in in any way, use the-- plugin-load option. The-- skip-grant-tables option can also invalidate the disabled_storage_engines system variable.
Flush privileges statements can be implicitly executed by performing other actions after the server starts. For example, the mysql_upgrade program refreshes permissions during the upgrade process.
Thank you for your reading, the above is the content of "analyzing the skip-grant-tables options of mysqld". After the study of this article, I believe you have a deeper understanding of the analysis of mysqld skip-grant-tables options, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.