In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces how to realize the user creation of mysql, which is very detailed and has certain reference value. Friends who are interested must finish reading it!
Mysql > create database test
Query OK, 1 row affected (0.00 sec)
Mysql >
Mysql > create user 'chenyj'@'*' identified by' chenyj'
Query OK, 0 rows affected (0.01 sec)
Mysql >
Mysql > grant all on test.* to chenyj@'*'
Query OK, 0 rows affected (0.00 sec)
Mysql > flush privileges
Query OK, 0 rows affected (0.01 sec)
Mysql >
Mysql > grant all on test.* to 'chenyj'@'*'
Query OK, 0 rows affected (0.01 sec)
Mysql > grant connect to 'chenyj'@'*'
ERROR 3523 (HY000): Unknown authorization ID `connect` @ `%`
Mysql >
Mysql > create user 'chenyj'@'%' identified by' chenyj'
Query OK, 0 rows affected (0.01 sec)
Mysql >
Mysql > grant all on test.* to 'chenyj'@'%'
Query OK, 0 rows affected (0.01 sec)
Mysql > flush privileges
Query OK, 0 rows affected (0.00 sec)
Test:
[root@mysql8-01 ~] # mysql-h localhost-u chenyj-p
Enter password:
ERROR 1045 (28000): Access denied for user 'chenyj'@'localhost' (using password: YES)
[root@mysql8-01 ~] #
[root@mysql8-01 ~] # mysql-h localhost-u chenyj-p
Enter password:
ERROR 1045 (28000): Access denied for user 'chenyj'@'localhost' (using password: YES)
[root@mysql8-01 ~] # mysql-h localhost-u chenyj-p
Enter password:
ERROR 1045 (28000): Access denied for user 'chenyj'@'localhost' (using password: YES)
[root@mysql8-01 ~] #
[root@mysql8-01 ~] # mysql-h localhost-u chenyj-p
Enter password:
Welcome to the MySQL monitor. Commands end with; or\ g.
Your MySQL connection id is 13
Server version: 8.0.14 MySQL Community Server-GPL
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 >
Mysql >
It should be noted that wildcards should use'%'
The above is all the content of the article "how to achieve user creation in mysql". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
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.