In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-22 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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.