In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the knowledge about "mysql new account and permission setting method under Linux". In the actual case operation process, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!
1. Authorization
Description: mysql is deployed on server A. Host B on the intranet connects to server A through client tools to operate. Server A needs to grant host B permission to operate.
1.1 Enter mysql on server A, assuming that mysql's account on server A is root:
mysql - u root -p
Enter your password!
1.2 Give Host B permission to operate the database
mysql> grant usage on *.* to username@192.168.0.1 identified by 'password';
Description: Give username@192.168.0.1 permission to use all databases, log in using username account on host 192.168.0.1, password: www.2cto.com
mysql> grant all privileges on newdb.* to username@192.168.0.1;
Description: Give username@192.168.0.1 the highest permission to operate database newdb. Log in with username account on host 192.168.0.1 without password.
Examples:
mysql> grant all privileges on *.* to root@192.168.0.1 identified by '123456' ;
Description: Give root@192.168.0.1 permission to use all databases, log in as root account on host 192.168.0.1, password: 123456
2. Remove the account
mysql> drop user root@192.168.0.1;
Note: Remove the root account so that host 192.168.0.1 can no longer use root to operate databases on server A
"mysql new account and permissions under Linux setting method" content is introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!
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.